Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 8-Nov-12 5:47am
musiw628
Edited 8-Nov-12 8:15am
v2
Comments
joshrduncan2012 at 8-Nov-12 12:12pm
   
What have you tried so far?

1 solution

Rate this: bad
good
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.
  Permalink  
Comments
Amit N. Saraf at 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
0 Maciej Los 325
1 OriginalGriff 278
2 Nguyen.H.H.Dang 230
3 Peter Leow 195
4 arvind mepani 187


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid