Click here to Skip to main content
11,714,776 members (77,288 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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
musiw713
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 Sergey Alexandrovich Kryukov 550
1 Richard MacCutchan 275
2 Maciej Los 274
3 ManasKumarM 155
4 CHill60 135
0 Sergey Alexandrovich Kryukov 545
1 CHill60 375
2 Maciej Los 324
3 Richard MacCutchan 310
4 OriginalGriff 260


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2015
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