Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi guys

is there anyway to code in vb.net a custom autonumber for ie:
"DR 001"
and the next one should be
" DR 002"
Posted
Comments
PIEBALDconsult 19-Jun-15 16:51pm    
I know there is at least one article on here that covers that, but I'm unsure how to search for it.
CHill60 19-Jun-15 17:47pm    
:) you're funny. Love the subtlety
Maciej Los 19-Jun-15 17:51pm    
Yes, it is ;)

1 solution

VB
myString = "DR" + myInteger.toString("000")


try this ...
 
Share this answer
 
Comments
ebie147 21-Jun-15 15:51pm    
Hi will this help when working with database with 3 people working on it?
Ralf Meier 22-Jun-15 0:49am    
I don't understand your question ...
What is your Goal ?
ebie147 23-Jun-15 6:26am    
so basically 3 or more people will be capturing data in a database, and it should automatically give them a reference, this reference should consist of a DR+ autonumber
Ralf Meier 23-Jun-15 6:53am    
Then you want to use this String as a kind of Identifier ?
If that works (for you) depends on the things you are doing behind ...
ebie147 23-Jun-15 9:37am    
that identifier won't be seen by them but it will be stored in the database, really need a way to get this working

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