|
-
February 2nd, 2007, 08:50 PM
#1
MS Access restart autonumber
I'm writing a C# application with an Access database behind it, and I stumbled upon something I can't figure out: one of my table's Primary Keys is in AutoNumber format, and I would like the auto-number to start from whatever the last number present is. It does not do that (it starts from whatever the last number EVER present was...).
For example:
Table contains:
1 - stuff
2 - more stuff
3 - even more stuff
If I delete record 3, then add another record, the table looks like this:
1 - stuff
2 - more stuff
4 - new stuff
rather than
1 - stuff
2 - more stuff
3 - new stuff
I can't even figure out how to reset the auto-number count from within Access, let alone from my code...
Anyone have any suggestions?
I realize that I could get rid of the AutoNumber type and programmatically take care of the numbering - it seems to me like there should be a simple and effective solution to reset the AutoNumber, though...
Thanks!
Similar Threads
-
By cheyenne1212 in forum Miscellaneous Security Discussions
Replies: 7
Last Post: February 1st, 2012, 02:51 PM
-
By ThePreacher in forum Miscellaneous Security Discussions
Replies: 17
Last Post: December 14th, 2006, 09:37 PM
-
By gore in forum Newbie Security Questions
Replies: 11
Last Post: December 29th, 2003, 08:01 AM
-
By Noble Hamlet in forum AntiOnline's General Chit Chat
Replies: 1100
Last Post: March 17th, 2002, 09:38 AM
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
|
|