Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

i want to know how to create column which is a serial number..lets say start with 'SA00001' or '00001'........

and then in my form, user will insert data in a form which has a serial number stated above.

No: SA00001
Name:
Quantity:
Total:

please help me on this

thanks in advance
musiw.
Posted
Updated 8-Nov-12 8:15am
v2
Comments
joshrduncan2012 8-Nov-12 12:12pm    
What have you tried so far?

1 solution

1) Get the current maximum value that exists from the numeric portion.
2) Create a string value of the serial number appending the appropriate string prefix and the left padded numeric portion together.
3) When the code you write doesn't do quite what you want, post the code you wrote yourself and we'll be glad to help more.
 
Share this answer
 
Comments
A N Saraf 9-Nov-12 0:29am    
Little bit more
U can add a column to your db which is numeric only and keep numeric part of serial no in it this would make your coding easy

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