Autogenerate IDs in VB6 and SQL
Posted on 2009-07-11
I have an SQL database and have a vb6 application. Here is the situation: We have students that are assigned IDs according to groups. The ID is comprised of 5 numbers. The first two numbers represent the Group. Then the next 3 numbers represent the Student ID. The Student ID increments by 1 every time there is a new student registered.
For example, If they belong to group A, then they will be assigned 23xxx.
Group B, then 24xxx
So if a 3 new students come to group A, then it would be 23001, 23002, 23003
Do I have the ability to use Autonumber in SQL or do something in VB6, to make this happen