1.11M Members

AutoNumber Alphanumeric

 
-3
 

Hi Geeks!,

I am developing a project now. My problem is how can I create a autogenerate alphanumeric in the textbox to be used as an ID of entries. I'm using VB.Net 2005 and MS SQL Server 2005 STD.

Thank you in advance. More power to this site.

 
0
 
  1. Geeks' Lounge is not the place to be asking your code/project related questions (last I checked)
  2. You're developing a project for what purpose?
  3. You're using MS SQL and VB.Net and it never occurred to you to allow the DataBase to do the id auto-generation for you as part of it's own ID column management?
  4. Geeks' Lounge is not the place to be asking your code/project related questions

Posting to try to be helpful as opposed to just neg-voting (which I came very close to doing) and hoping a MOD just pops this thread into the right place instead of deleting it for being in the completely wrong place.

 
0
 

I hope I'm in the proper Forum for posting the following solution. :icon_eek:

Dim myChars() As Char = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
        Dim idString As String = ""
        For idLength As Integer = 0 To 9 '// this will return a 10 character ID number.
            Dim i As Integer = Rnd() * (myChars.Length - 1)
            idString &= myChars(i)
        Next
        MsgBox(idString)
 
0
 

This code is good and i need alpha numeric in proper form like nov001 ...........and go on how to do this.kindly give ur ideas

 
0
 

Welcome nirmal111.

Please create a new thread. If you have any questions please ask. You are welcome to start your own threads.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: