I'm working with an MS Access 2000 database in Visual Basic. I've created some data objects that deal with the different tables in the database. I just finished porting all of the data in an old 97 database to the new and improved 2000 database. So far everything seems to have worked fine, except for one strange problem.
There are 408 records in the main table of the 2000 database. I'm using autonumber for their key field, the first record has key 30, the last has key 437. The strange thing is that my data access object does not read them in sequential order.
To be more specific, I have created a standard ADO recordset object that deals with the main table. When I use the MoveFirst method of that object, it brings me to record number 95, instead of 30. I originally thought this meant it was ignoring the first 65 records, but I have just discovered that for some reason using the MoveNext method to go through each record goes in sequential order from 95 to 234, then it goes from 30 to 94, then takes up again where it left off at 235 and continues properly until the end of the recordset.
So the recordset perceives the table keys as going like this:
95, 96, 97...234, 30, 31, 32, 33...94, 235, 236, 237...437
Anyone know have any idea why this is occurring? I've made sure that the key is sorted in ascending order, and when opened in MS Access the table displays exactly as it should.
Any help would be appreciated.
-Adrian
There are 408 records in the main table of the 2000 database. I'm using autonumber for their key field, the first record has key 30, the last has key 437. The strange thing is that my data access object does not read them in sequential order.
To be more specific, I have created a standard ADO recordset object that deals with the main table. When I use the MoveFirst method of that object, it brings me to record number 95, instead of 30. I originally thought this meant it was ignoring the first 65 records, but I have just discovered that for some reason using the MoveNext method to go through each record goes in sequential order from 95 to 234, then it goes from 30 to 94, then takes up again where it left off at 235 and continues properly until the end of the recordset.
So the recordset perceives the table keys as going like this:
95, 96, 97...234, 30, 31, 32, 33...94, 235, 236, 237...437
Anyone know have any idea why this is occurring? I've made sure that the key is sorted in ascending order, and when opened in MS Access the table displays exactly as it should.
Any help would be appreciated.
-Adrian