Import order wrong (1 Viewer)

mrabrams2

Registered User.
Local time
Today, 03:51
Joined
Apr 29, 2003
Messages
54
Not a big deal - I am more curious than anything.

I have a simple import spec. Imports a text file into a pre-existing empty table.
The first field in the table is RecNum (not part of the text file).
Most of the time, after I import the file and check the table, the table is in the same order (1 through whatever) of the text file.
Ocassionally, the table is in no particular order, but when I sort it ascending, it is in the same order as the text file.

Is this typical? (Oh yeah, this is Access- ain't nuttin' typical :(

Any ideas?

Thank you,
Michael
 

mrabrams2

Registered User.
Local time
Today, 03:51
Joined
Apr 29, 2003
Messages
54
You're not kidding!

Whoa! That was a bit wordy :D - but very well explained.

Thank you for the link !!

Michael
 

jguscs

Registered User.
Local time
Today, 02:51
Joined
Jun 23, 2003
Messages
148
I believe what you want to take a look at is an option called "AutoIndex on Import/Create."
It is located in the "Tables/Queries" tab in Options.
There is a default AutoIndex filled in for you.
Delete the default entry and importing will no longer change the order of your rows.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:51
Joined
Feb 19, 2002
Messages
43,768
I do not recommend leaving this option on. You should manage the creation of indexes yourself. This option will generate a UNIQUE index on every column that ends in the listed suffixes. That means that if you had OrderID and CustomerID in the same table, you would end up with unique indexes on both. That won't work because you don't want a unique index on CustomerID since customers can have more than one order.
 

jguscs

Registered User.
Local time
Today, 02:51
Joined
Jun 23, 2003
Messages
148
...OK?
I'm not quite sure what you said has anything to do with "random" sorting during a text import (but I'm sure it does...).
Are you saying that it's a bad idea to delete the default index settings?
 

Users who are viewing this thread

Top Bottom