B
Bertrand
Hi All.
I'm trying to create a table with a autoincrement field of type GUID using
DAO code.
In the past I used this type of procedure with dbLong type as in the
following code.
But now every attempt with dbGUID fails!
I digged aroud without success and it seems that nobody adds auto guid
fields by code.
Could you please confim me if this operation is possible or not?
Many thanks
B.
Set dbDat = OpenDatabase(strPath)
Set tdf = dbDat.CreateTableDef("TestTable")
tdf.Fields.Append tdf.CreateField("Order_id", dbText, 10)
tdf.Fields.Append tdf.CreateField("Date", dbDate)
tdf.Fields.Append tdf.CreateField("Test1", dbSingle)
Set fld = tdf.CreateField("GUID", dbLong)
fld.Attributes = dbAutoIncrField
tdf.Fields.Append fld
dbDat.TableDefs.Append tdf
dbDat.TableDefs.Refresh
I'm trying to create a table with a autoincrement field of type GUID using
DAO code.
In the past I used this type of procedure with dbLong type as in the
following code.
But now every attempt with dbGUID fails!
I digged aroud without success and it seems that nobody adds auto guid
fields by code.
Could you please confim me if this operation is possible or not?
Many thanks
B.
Set dbDat = OpenDatabase(strPath)
Set tdf = dbDat.CreateTableDef("TestTable")
tdf.Fields.Append tdf.CreateField("Order_id", dbText, 10)
tdf.Fields.Append tdf.CreateField("Date", dbDate)
tdf.Fields.Append tdf.CreateField("Test1", dbSingle)
Set fld = tdf.CreateField("GUID", dbLong)
fld.Attributes = dbAutoIncrField
tdf.Fields.Append fld
dbDat.TableDefs.Append tdf
dbDat.TableDefs.Refresh