|
| |
|
|
nay27uk
Posts: 282 Joined: 5/13/2003 From: leicester uk Status: offline
|
Access Database - 11/19/2004 13:02:54
Hi all in an access database when you have a primary key in my case the primary key is a field called UserID If you delete anything from the database is ther any way to get the primary key back to the following number. Example if i removed UserID 1 how can i get the database to add a new record as UserID 2 instead of somthin else
_____________________________
REGARDS NATHAN
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Access Database - 11/19/2004 13:34:56
In Access, a PK by definition doesn't force the number, it is the type AutoNumber that forces the increments. The PK requirements just force the field to be unique IIRC. To always use the next available number in a sequence, you'd have to set the field back to just an integer and somehow check for uniqueness. I would highly advise against this; it's far too easy and convenient to keep the field AutoNumber and be assured of maintaining "uniqueness". If you really want the User ID to be sequential, you'd need to set up a separate UserID field and check the numbers for gaps each time you added a user. This is probably far more trouble than it's worth IMO. May I ask why you must have them all sequential?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
nay27uk
Posts: 282 Joined: 5/13/2003 From: leicester uk Status: offline
|
RE: Access Database - 11/19/2004 13:39:26
No point really just in admin.asp it shows this field and i kinda thought it would look more tidy than jumping from say UserID 1 to UserID 50 ECT ECT
_____________________________
REGARDS NATHAN
|
|
|
|
nay27uk
Posts: 282 Joined: 5/13/2003 From: leicester uk Status: offline
|
RE: Access Database - 11/20/2004 11:59:52
Thanks all think i will just leave it as it is and make a brand new database when i submit the GB to the public
_____________________________
REGARDS NATHAN
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|