Order of records in a table? Db corrupt?



Hi.

I've got an Access table with autonumber primary key. I connect to the table
from my Delphi 5 application using TAdoConnection and TAdoTable.

When I do

MyTable.First;
while not MyTable.Eof do begin
...
MyTable.Next
end;


I expect to read the record ordered by the primary key. This has also been
the case for a long time.

But suddenly with one table, the records are not sorted properly. I have
tried to repair the database, but it doesn't help.

Am I wrong i expecting, that reading records like above, is equivalent to
reading them like this:

SELECT * FROM mytable ORDER BY myprimarykey

Is the database corrupt?

Thanks for any help!

Jacob




.



Relevant Pages

  • Re: Order of records in a table? Db corrupt?
    ... Yes, in general you are wrong, allthough this may vary from engine ... I expect to read the record ordered by the primary key. ... Am I wrong i expecting, that reading records like above, is equivalent to ... Is the database corrupt? ...
    (borland.public.delphi.database.ado)
  • Re: Lost Relationships
    ... they are essential to the integrity of ... I have experienced Access losing some relationships, ... Typically it happens when a primary key field index, ... Is my database corrupt? ...
    (microsoft.public.access.modulesdaovba)