Dataport Imports Last record ONLY

I created a dataport to import data frm a CSV file. The dataitem table is members and the key is Entry No. which is an integer.

My CSV file lacks the entry no. collumn which should increment by one every time a new records is imported.

Imagine the import is said to be successful but only imports one record out of the many available(The last one in the CSV file). What could be the reason to this.

NB The import process is not gererating any error but only imports the last record of the file.

You answered your own question:


Another suggestion is to reset the Entry No to zero (assuming an Autoincrement) after each record otherwise the dataport overwrites each time leaving you with the last record.

Am not sure if i got what u guys are suggesting. Could u plz be quite detailed. Do i need to write some code on before import record to determine the entry no or do i include the entry No collumn on my file.

Plz assist

Either you follow David Singleton’s suggestion, which really was your own: Add the column

Or you follow DaveT’s suggestion, to make sure the Entry No. is 0 and you have setup the field as and AutoIncremental field.


You have three options

  1. (David’s suggestion) - add the entry number to the file you are importing and add the Entry No. to the dataport fields

  2. If the entry no. is an autoincrement, then resetting it each time to zero will assign a new number when the record is inserted

  3. Write code to control the entry no. yourself (option 1 or 2 is better for a number of reasons)