Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'd like to know how to generate serial number of 14 digits that can be stored in database and everytime a number is automatically added when the additional button is pressed.And that number is similar to serial numbers of telecommunication cards without repeating.
thank you for your cooperation.
Posted
Updated 10-Jun-10 9:32am
v2
Comments
TheyCallMeMrJames 10-Jun-10 15:19pm    
Is the serial number length required to be 14 digits? Can it have leading/trailing zeros? Is it number only, or alpha-numeric?

How do you mean without repeating? Are you meaning no duplicates, or is there no repeating of the characters in the serial number?

Can the serial number be sequential?

-jc
sweet_memory 10-Jun-10 16:17pm    
yeah,i mean like the serial number in telecommunication cards like 01293678520943
the next number increasing like that 01293678520944

1 solution

The easiest way of doing this is to create a GUID and truncate it.
 
Share this answer
 
Comments
sweet_memory 10-Jun-10 17:56pm    
please,how to do it?
i don't understand it
thank you for your cooperation

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900