
Data Types when using Access Types in VB6
Hi
I changed the code to look like this
f22.Name = "Product_ID"
f22.Attributes = dbAutoIncrField
newtable.Fields.Append f22
It tells me that I have an invalid type ?
Do you know whats wrong ?
Thanks
Jonathan
Quote:
> typed and posted to comp.lang.basic.visual.database:
> Jonathan:
> This is what you are looking for. By the way I found a nice
> little freeware program that will take out the grunt work of
> re-creating an access db with code by doing it it's self. It creates
> a .bas file of the database with all the code to recreate the entire
> db from tables to SQL to relationships. Just email me if you want it.
> It's only 36k zipped.
> f22.Attributes = dbAutoIncrField
> Hope this helps
----- Original Message -----
Newsgroups: comp.lang.basic.visual.database
Sent: 30 October 1999 20:57
Subject: Data Types when using Access Tables in VB6
> Hello Anyone
> Hopefully someone can help me with this problem.
> I am designing a piece of software that creates a database.
> Part of the code looks like this :
> f22.Name = "Product_ID"
> f22.Type = AUTO
> newtable.Fields.Append f22
> f23.Name = "SuppCode"
> f23.Type = DB_TEXT
> f23.Size = 4
> newtable.Fields.Append f23
> I want the Product_ID field to be of AUTONUMBER type (like you can do in
MS
> Access).
> Can this be done ? If so, what is the code ?
> Thanks
> Jonathan