DavidT_macktool
Well-known member
I need to store the serial numbers used on parts. We assign a series of serial numbers to some of the parts we make. We keep track of which number we use in a log book sorted by part number. Almost all of our serial numbers for aerospace parts take the form of a 4 or 5 digit number that is Laser marked on the part along with our vendor code. It would look like : 08040 - 00012 for serial number 12.
I need suggestions on how to deal with this?
I only need simple calculations to be performed:
StartSerial = previousEndSerial + 1
EndSerial = StartSerial + Quantity - 1
to add records to the dataset. User will input Quantity (number of parts).
Here's my initial Idea:
Store StartSerial and EndSerial as strings in the dataset (SQL2000).
Get the length of the previousEndSerial string.
Convert previousEndSerial to integer.
Do the calculations.
Test the number of digits of the new numbers (if < 10, if <100, if <1000, etc).
Convert to string and add the correct number of leading zeros to get the correct length.
Anyone thinking of different/better logic?
Thanks for looking...
I need suggestions on how to deal with this?
I only need simple calculations to be performed:
StartSerial = previousEndSerial + 1
EndSerial = StartSerial + Quantity - 1
to add records to the dataset. User will input Quantity (number of parts).
Here's my initial Idea:
Store StartSerial and EndSerial as strings in the dataset (SQL2000).
Get the length of the previousEndSerial string.
Convert previousEndSerial to integer.
Do the calculations.
Test the number of digits of the new numbers (if < 10, if <100, if <1000, etc).
Convert to string and add the correct number of leading zeros to get the correct length.
Anyone thinking of different/better logic?
Thanks for looking...