Hi, I am using Access 2000. I tried to use "UpdateBatch" method on ADODB recordsets. I set cursor type to adOpenKeyset and LockType to adLockBatchOptimistic. However, the method will only updated one record. If more that one record is entered I receive the following error message with error number "-214467259" and description "Empty row cannot be inserted. Row must have at least one column value set" came up. It is erroring at UpdateBatch. Any suggestions.Many thanks
Call SaveCurrentRecord
'create a new connection instance and open it using the connection string
Set cnCh5 = New ADODB.Connection
cnCh5.Open strConnection
'set the disconnected recordset to the reopened connection
Set rsCustomer.ActiveConnection = cnCh5
'save all changes in the local disconnected recordset back
'to the database
rsCustomer.UpdateBatch
'disconnect the recordset again
Set rsCustomer.ActiveConnection = Nothing
'close the database connection and release it from memory
cnCh5.Close
Set cnCh5 = Nothing
End Sub
Call SaveCurrentRecord
'create a new connection instance and open it using the connection string
Set cnCh5 = New ADODB.Connection
cnCh5.Open strConnection
'set the disconnected recordset to the reopened connection
Set rsCustomer.ActiveConnection = cnCh5
'save all changes in the local disconnected recordset back
'to the database
rsCustomer.UpdateBatch
'disconnect the recordset again
Set rsCustomer.ActiveConnection = Nothing
'close the database connection and release it from memory
cnCh5.Close
Set cnCh5 = Nothing
End Sub