Click here to Skip to main content
12,405,543 members (60,701 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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
musiw729
Updated 8-Nov-12 8:15am
v2
Comments
joshrduncan2012 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 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 | Mobile
Web01 | 2.8.160721.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2016
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