M
Mark C
Hi
I have written an access 2000 DB which uses ADOX to open and add fields
to an existing database. I Can add fields no problem, I can modify
almost all the properties of the fields, EXCEPT the nullable property.
The code below shows the different methods I've tried. I generally get
an error number -2147217887 with description
"Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done."
I can change any of the column properties, name, description, zero
length, etc however not nullable. I can't change the new field, or
established fields, from this or any other table. I can't change from
true to false, or false to true without getting this error.
I'm at my wits end, can anyone help me please
Regards
Mark
===========================================================
Public Const cstrDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine
Type=5;Jet OLEDBatabase Password=xxxxxxx;Data Source=c:\file1.mdb"
<snip>
Set dbCat1 = initialize(cstrdsn)
WriteEventLog 0, "ADOX: Open", "updateTable"
With dbCat1.Tables("jrmCustomer").Columns
'For Each objTmp In .Item("ctillcustomerid7").Properties
' Debug.Print objTmp.Name; ": "; objTmp.Value
'Next
.Append "cTillCustomerID", adVarWChar, 10
.Item("cTillCustomerID").Properties("Jet OLEDB:Allow Zero Length") =
True
.Item("cTillCustomerID").Properties("Default") = Chr(34) & " " & Chr
(34)
'.Item("cTillCustomerID").Properties("NullAble") = True
GoTo end_err1
Set oColumn = New ADOX.Column
oColumn.Name = "cSpareN1"
oColumn.Type = adInteger
oColumn.Properties("Nullable") = True
.Append oColumn
'''.Append "cSpareN1", adInteger
'''.Item("cSpareN1").Properties("Nullable") = True
</snip>
I have written an access 2000 DB which uses ADOX to open and add fields
to an existing database. I Can add fields no problem, I can modify
almost all the properties of the fields, EXCEPT the nullable property.
The code below shows the different methods I've tried. I generally get
an error number -2147217887 with description
"Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done."
I can change any of the column properties, name, description, zero
length, etc however not nullable. I can't change the new field, or
established fields, from this or any other table. I can't change from
true to false, or false to true without getting this error.
I'm at my wits end, can anyone help me please
Regards
Mark
===========================================================
Public Const cstrDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine
Type=5;Jet OLEDBatabase Password=xxxxxxx;Data Source=c:\file1.mdb"
<snip>
Set dbCat1 = initialize(cstrdsn)
WriteEventLog 0, "ADOX: Open", "updateTable"
With dbCat1.Tables("jrmCustomer").Columns
'For Each objTmp In .Item("ctillcustomerid7").Properties
' Debug.Print objTmp.Name; ": "; objTmp.Value
'Next
.Append "cTillCustomerID", adVarWChar, 10
.Item("cTillCustomerID").Properties("Jet OLEDB:Allow Zero Length") =
True
.Item("cTillCustomerID").Properties("Default") = Chr(34) & " " & Chr
(34)
'.Item("cTillCustomerID").Properties("NullAble") = True
GoTo end_err1
Set oColumn = New ADOX.Column
oColumn.Name = "cSpareN1"
oColumn.Type = adInteger
oColumn.Properties("Nullable") = True
.Append oColumn
'''.Append "cSpareN1", adInteger
'''.Item("cSpareN1").Properties("Nullable") = True
</snip>