Ms Access Database Pros, a little help to those in the know |
|
Ms Access Database Pros, a little help to those in the know |
|
|
|
|
Feb 16 2008, 06:53 PM |
Isn't it easier to make it an auto-increment value starting from 1? With random generating you may run in a problem of hitting the same number and you'll fail to update the table (this is extremely rare in a range of 1-1000 but it may happen, while with auto-increment it will never happen).
I hope someone will give you the answer you're looking for, but in MySQL database i always do it with auto-increment value. -------------------- "It isn't how many years you have been playing, it's how many hours." -- Prashant Aswani "PRACTICE, PRACTICE, PRACTICE!" -- Michael Angelo Batio Check out my video lessons and instructor board! |
|
|
||
|
|
|
Feb 17 2008, 04:34 PM |
You never set range for primary key man. It doesn't makes sense because when you insert more than 1000 rows in your table (and that will happen sooner than you think believe me), the error will occur. Pavel said it right. You have to set the autonumber value for all your primary keys. Access does this by default anyway so there is no reason complicating. There is no point inserting random number as you primary key anyway.
-------------------- - Ivan's Video Chat Lesson Notes HERE
- Check out my GMC Profile and Lessons - (Please subscribe to my) YouTube Official Channel - Let's be connected through ! Facebook! :) |
|
|
||