Create auto filed ,which automatically generate value, programmatically in Vb6 is easy with two line of code.
What we will do when you need create auto value programmatically or with query.
Here what you need to do
- Create a number/text field.
- Alter the filed as auto .
alter table YourTable column [auto] counter(1,1)
You can use the statement with Execute method of ADO connection in VB6 as follows
adodbconnection.Execute “alter table YourTable alter column [auto] counter(1,1)”