Export table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

When I display a table, the records are in the right order, but when I
export the table as a fixed length text file. The records in text file are
out of order. Why it is doing that and how I can fix it? I use Access
2000 and Windows 2000.

Thanks so much.
 
If you want to export in a specific order, create a Query with the required
sorting / ordering and the use the Query for export and not the Table.

Database engine retrieves Records in no particular order for efficiency so
you need to specify the ordering if you need Records in some order.
 
Hi Van,

Thank you for the prompt reply. At the same time, I realize I didn't set a
primary key on the ID. Once I set it, the table is exported the way it
displays.

Siew-Ming
 
Yes. Access (not JET, the database engine) seems to default the sorting to
PK if there is a PK present. However, in theory, database engines (JET and
others) retrieve Records whichever way they assess to be the fastest.

Hence, if you want a particular order, the only way to be sure is to specify
the sort order in a query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top