Easy to Create, Easy to Change - Easy to use!


Import into DataEase 8


Started by Barry Peterson
Search
You will need to Sign In to be able to add or comment on the forum!

Import into DataEase 8

We have done some initial testing and like what we see. How do we import records from a csv file? I guess what I'm asking is there a "field mapping"

option where we can select the fields and map them.

What I am seeing is that there appear to be just two options

1 - Import in field order

2 - Create fields in Dataease that have the same exact names as are used in the import file.

Is there a third option that will allow us to pick the fields and manually match them to the fields in the database. Or can this be accomplished through a procedure ... DQL?

Written by Barry Peterson 12/01/16 at 09:50:09 Dataease [{8}]FIVE

Re:Import into DataEase 8

If you can't manipulate the export file i.e. decide what names the columns get in the file and you don't want to be limited to field order or use the same field names in the DataEase application, the best way is to simply make a temporary table in DE85 with the exact names and types of your export file, import into this one and then run a dql that reads the import table and enter the records in the actual table.


Forms/tables is very quick to make in DataEase and in combination with a DQL the most flexible way to do any data mapping/transfer.

define "retval" text .
retval := dataimporet("yourimp.dbi") .

Retval := execdql("Delete records in temp_import .") -- run a DQL to delete the table you will use in this DQL so you don't get lockout problems.
for temp_import ;
enter a record in Real_import
CustomerNr := temp_Import Customernumber ;
etc.

Written by DataEase 12/01/16 at 09:51:09 Dataease [{8}]FIVE