The following is an extract form my programming, using ADO, to store a value - arValues(i) - into a field - Fields(1), having first created a new record in the recordset.
objRS.AddNew
objRS.Fields("Data_ID").Value = intIndex
objRS.Fields(1).Value = arValues(i)
objRS.Update
The first & second lines work without errors. The third line produces the following error:
Error no is... -2147217887
Description... Field cannot be updated.
Source... Microsoft JET Database Engine
The fourth line produces the following error (presumably this could be a cascading error):
Error no is... -2147217887
Description... Update or CancelUpdate without AddNew or Edit.
Source... Microsoft JET Database Engine
All this takes place having added a column to the database using ADOX, which occurs successfully & without errors. However, when I establish the name of the field in the recordset - objRS - which corresponds to the new column, I get the following:
Name of objRS col 1 = Expr1001
perhaps this is significant?
What have I done wrong??
All help gratefully received. Thanks.
ADO-Nick
objRS.AddNew
objRS.Fields("Data_ID").Value = intIndex
objRS.Fields(1).Value = arValues(i)
objRS.Update
The first & second lines work without errors. The third line produces the following error:
Error no is... -2147217887
Description... Field cannot be updated.
Source... Microsoft JET Database Engine
The fourth line produces the following error (presumably this could be a cascading error):
Error no is... -2147217887
Description... Update or CancelUpdate without AddNew or Edit.
Source... Microsoft JET Database Engine
All this takes place having added a column to the database using ADOX, which occurs successfully & without errors. However, when I establish the name of the field in the recordset - objRS - which corresponds to the new column, I get the following:
Name of objRS col 1 = Expr1001
perhaps this is significant?
What have I done wrong??
All help gratefully received. Thanks.
ADO-Nick