[AccessD] Losing order when importing text

Gustav Brock gustav at cactus.dk
Tue Jun 24 14:07:24 CDT 2003


Hi Mark

You are touching one of the very fundamental rules of a relational
database: records don't have an order.

However, you may sort on one or more fields. If this is not possible
you'll have to add sequential line numbers to the lines in your text
file and import these as well, then order by those line numbers.

Better yet is to skip the TransferText and write your own code to read
the file line by line; then let your code add the record number as you
go.
Go to Seth's site:

  http://puma.agron.ksu.edu/~sgsax/

and look for "File I/O in VB" under "My Downloads"

/gustav


> When I import text using Docmd.TransferText, my records import out of
> order.

> It is very important that the records import in the exact same order
> that they appear in the file.

> Is there a way to control this so the table keeps the text file's exact
> layout?



More information about the AccessD mailing list