|
-
Feb 5th, 2000, 07:23 AM
#1
Thread Starter
Junior Member
Ok... I have a database and a program which views the fields in the database. I am using an access 2000 database, ADO, and Jet.OLEDB.4.0. Each entry in the table has an ID number which I am automatically assigning with AutoNumber. The problem is that when I delete a record(for example say that it had ID "15"). The next record that I add will have ID "16", without assigning a record to ID 15. How do I prevent this?
Thanks In Advance....
------------------
Mitchell Hayenga
[email protected]
-
Feb 5th, 2000, 10:07 AM
#2
Lively Member
You can't. Once an autonumber has been used, then it has been used - end of story.
Not what you want to hear but the truth isn't always pleasant!!!
-
Feb 6th, 2000, 07:09 AM
#3
Guru
After you compact the database, the autonumbers will again begin at the next available number.
If you delete all records in a table, then compact, it will restart at 1
If you delete the last 3 numbers, then compact, it will restart at the number of the 1st one
hope that makes sense....try it for yourself if it doesn't
Tom
-
Feb 6th, 2000, 11:37 AM
#4
Thread Starter
Junior Member
Thanks, I'll have to try that.....
------------------
Mitchell Hayenga
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|