ZuperDuper
Programmer
When I try yo fill the Access table that I create, I get an error 'Required Property of the field is set to TRUE' if I do not set the particular field with any value. Apparently it cannot be NULL. This is how I create the table:
sCreateString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
sResults
newdb1.Create(sCreateString)
cn.Open(sCreateString)
newdb1.ActiveConnection = cn
With newtd1
.Name = "RESULTS"
.Columns.Append("NUMBER")
.Columns.Append("DBF")
.Columns.Append("FIELD") ', ADOX.DataTypeEnum.adChar, 30)
.Columns.Append("ITEM") ', ADOX.DataTypeEnum.adChar, 50)
.Columns.Append("CODE") ', ADOX.DataTypeEnum.adChar, 10)
.Columns.Append("COUNT") ', ADOX.DataTypeEnum.adBigInt)
.Columns.Append("TOTAL") ', ADOX.DataTypeEnum.adBigInt)
.Columns.Append("OUTHOUSE") ', ADOX.DataTypeEnum.adChar, 4)
End With
newdb1.tables.append(newtd1)
newrs1.Open("select * from RESULTS", cn, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)
then later if I .addnew() and then .update() , for any field that is not assigned a value, I get that error. What should I do to set the 'required property' to FALSE?
You should never underestimate the predictability of stupidity.
sCreateString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
sResults
newdb1.Create(sCreateString)
cn.Open(sCreateString)
newdb1.ActiveConnection = cn
With newtd1
.Name = "RESULTS"
.Columns.Append("NUMBER")
.Columns.Append("DBF")
.Columns.Append("FIELD") ', ADOX.DataTypeEnum.adChar, 30)
.Columns.Append("ITEM") ', ADOX.DataTypeEnum.adChar, 50)
.Columns.Append("CODE") ', ADOX.DataTypeEnum.adChar, 10)
.Columns.Append("COUNT") ', ADOX.DataTypeEnum.adBigInt)
.Columns.Append("TOTAL") ', ADOX.DataTypeEnum.adBigInt)
.Columns.Append("OUTHOUSE") ', ADOX.DataTypeEnum.adChar, 4)
End With
newdb1.tables.append(newtd1)
newrs1.Open("select * from RESULTS", cn, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)
then later if I .addnew() and then .update() , for any field that is not assigned a value, I get that error. What should I do to set the 'required property' to FALSE?
You should never underestimate the predictability of stupidity.