Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting an Access 97 Field to allow null values
Message
From
19/09/2001 11:48:51
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Setting an Access 97 Field to allow null values
Miscellaneous
Thread ID:
00558371
Message ID:
00558371
Views:
59
I am creating a new database using adox and then creating a new table in that database and adding all the fields. No problem.. When I go to append data into the database I get a cant allow null values in n field error that I cant seem to overcome.

I am looking and in ADOX you can set some of the properties and one of the properties is nullable but when I try to set this to true I get the following error:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

I have looked up and the property as per the adox documentation is writeable but I have yet to figure out what I have done wrong.

ie.
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strDBName & ";" & _
"Jet OLEDB:Engine Type=4;"

' *** This will create an access DB ***
Set cat = New ADOX.Catalog
cat.Create strConn
' *** This will create a Table ***
Set tbl = New ADOX.Table
tbl.name = tblName
cat.Tables.Append tbl

tbl.Columns.Append "name", lngType, lngDefLen
cat.Tables.Refresh
tbl.Columns("name").Properties("nullable").Value = True


Thanks,
Jason
Next
Reply
Map
View

Click here to load this message in the networking platform