wildbeliefs
12-18-2003, 10:07 AM
Hey,
I'm trying to create a db through code and am running into some problems with setting some attributes, like defaults. Here's my code where the table is created:
'Deck Table''''''''''''''''''''''''''''''''''''''
With Deck
Set .ParentCatalog = objcat
.Name = "Deck"
.Columns.Append "ProjectID", adVarWChar, 50
.Columns.Append "DeckName", adVarWChar, 50
.Columns.Item("Deckname").Properties.Item("default") = "***"
.Columns.Item("ProjectID").Attributes = adColNullable
End With
objcat.Tables.Append Deck
I get the error: "Application uses a value of the wrong type for the current operation"
Anybody know what's wrong? Is it the syntax?
I'm trying to create a db through code and am running into some problems with setting some attributes, like defaults. Here's my code where the table is created:
'Deck Table''''''''''''''''''''''''''''''''''''''
With Deck
Set .ParentCatalog = objcat
.Name = "Deck"
.Columns.Append "ProjectID", adVarWChar, 50
.Columns.Append "DeckName", adVarWChar, 50
.Columns.Item("Deckname").Properties.Item("default") = "***"
.Columns.Item("ProjectID").Attributes = adColNullable
End With
objcat.Tables.Append Deck
I get the error: "Application uses a value of the wrong type for the current operation"
Anybody know what's wrong? Is it the syntax?