If you want to be able to modify a recordset in an ODBCDirect workspace,
you must specify a
LockEdits argument with the
OpenRecordset method. The full syntax for the
OpenRecordset method is as follows:
Set recordset=object.OpenRecordset(source, type, options, lockedits)
You create an editable recordset when you use one of the following
constants in the
LockEdits argument of the
OpenRecordset method:
dbOptimistic
dbPessimistic
dbOptimisticValue
dbOptimisticBatch
For example, the following line of sample code opens an editable recordset
that uses optimistic record locking:
Set RS = conPubs.OpenRecordset("Authors",dbOpenDynamic,0,dbOptimistic)
NOTE: You must supply a zero (0) for the
Options argument.