Click here to Skip to main content
13,152,454 members (37,643 online)
Rate this:
Please Sign up or sign in to vote.
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

please help me on this

thanks in advance
Posted 8-Nov-12 5:47am
Updated 8-Nov-12 8:15am
joshrduncan2012 8-Nov-12 12:12pm
What have you tried so far?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Amit 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170924.2 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100