- Local time
- Today, 10:39
- Joined
- Sep 12, 2006
- Messages
- 15,975
Just to clarify, these are not table ID numbers at all. These are unique drawing numbers. We have gaps because we've never really had a great system for managing drawings. I don't even know how large the gaps will be. It's certainly easier to ignore them but I'm investigating NOT ignoring them.
@gemna-the-husky - Why avoid DMax?
@plog - Technically these would be strings because of the need for leading zeros. An Example Drawing number would be "FD-00056-01"
Why not use a dmax?
As I said, If you actually want to restart the sequence at a higher number, you can't with dmax
The other thing relates to sequencing issues if you have a next number table or a dmax, The timing of obtaining the next number needs to be left to the very last stage. Otherwise a user can get a next number and then decide not to use it, and you still get a gap. Either that or two concurrent users might get the same number. Therefore you still need to manage the timing of the process to obtain the next number. If you use a table, you can lock and increment the next number in the table. If you use a dmax, you might need to re-do the dmax if the number you get has just been taken by another user doing the same process.
I think what @plog meant is that incrementing a string is tricky. You can't easily do a dmax is your references run "FD-00056-01", then "GS-00057-01". You need to store the drawing count as a number on its own.
Last edited: