ADOX modify column Nullable
- From: Mark C <ineedhelp@xxxxxxxxxxxxx>
- Date: Sat, 08 Oct 2005 05:09:10 -0700
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 OLEDB:Database 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
.
- Prev by Date: Re: Number of rows in a datagrid
- Next by Date: Re: Converting Command->Execute to Recordset->Open
- Previous by thread: Re: Number of rows in a datagrid
- Next by thread: How to retrive date field with vb6 code and SQL server 2000
- Index(es):
Relevant Pages
|
|