JohnEddins
asked on
Create Autonumber Field in Access: VB.net
Hello all,
I am having a hard time figuring out how to create an autonumber field in Access with vb.net. I am using code to create a database and tables, and plan to load imported text files into these tabels. But I'm still stuck on trying to create the autonumber field. Below is sample code of how i am creating the fields in the tables:
ADOXtable1.Name = "Points"
Col.Name = "Field1"
Col.Type = ADOX.DataTypeEnum.adDouble
ADOXtable1.Columns.Append( Col)
Col = New ADOX.Column()
Thanks,
John
I am having a hard time figuring out how to create an autonumber field in Access with vb.net. I am using code to create a database and tables, and plan to load imported text files into these tabels. But I'm still stuck on trying to create the autonumber field. Below is sample code of how i am creating the fields in the tables:
ADOXtable1.Name = "Points"
Col.Name = "Field1"
Col.Type = ADOX.DataTypeEnum.adDouble
ADOXtable1.Columns.Append(
Col = New ADOX.Column()
Thanks,
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This does not work, it is showing Properties as a read only attribute...
As you can see at http://www.dotnet4all.com/Dot-Net-Books/2004/08/creating-table-in-access-database-with.html, you need to add the .Value
ASKER
You are good... any special search techniques you use to get this info...
Thanks again for the help
Thanks again for the help
>>any special search techniques you use to get this info...
Google is your friend!
I have a lot of links in my favorites.
Google is your friend!
I have a lot of links in my favorites.
ASKER