The Status property on a Recordset object indicates the status of the current record with respect to batch updates or other bulk operations. This property returns a Long value.
oldStatus = currentRecordset.Status
The Status property is used to return the current status of a recordset object at any time. The value of the Status property returns a sum of the following RecordStatusEnum enumerated values:
Enumeration | Value | Description |
---|---|---|
adRecOK | 0 | This value indicates that the recordset object was successfully updated. |
adRecNew | 0x1 | This value indicates that the recordset object is new. |
adRecModified | 0x2 | This value indicates that the recordset object was modified. |
adRecDeleted | 0x4 | This value indicates that the recordset object was deleted. |
adRecUnmodified | 0x8 | This value indicates that the recordset object was not modified. |
adRecInvalid | 0x10 | This value indicates that the recordset object was not saved because its bookmark is invalid. |
adRecMultipleChanges | 0x40 | This value indicates that the recordset object was not saved because it would have affected multiple records. |
adRecPendingChanges | 0x80 | This value indicates that the recordset object was not saved because it refers to a pending insert. |
adRecCanceled | 0x100 | This value indicates that the recordset object was not saved because the operation was canceled. |
adRecCantRelease | 0x400 | This value indicates that the new recordset object was not saved because of existing record locks. |
adRecConcurencyViolation | 0x800 | This value indicates that the recordset object was not saved because optimistic concurrency was in use. |
adRecIntegrityViolation | 0x1000 | This value indicates that the recordset object was not saved because the user violated integrity constraints. |
adRecMaxChangesExceeded | 0x2000 | This value indicates that the recordset object was not saved because there were too many pending changes. |
adRecObjectOpen | 0x4000 | This value indicates that the recordset object was not saved because of a conflict with an open storage object. |
adRecOutOfMemory | 0x8000 | This value indicates that the recordset object was not saved because the computer has run out of memory. |
adRecPermissionDenied | 0x10000 | This value indicates that the recordset object was not saved because the user has insufficient permissions. |
adRecSchemaViolation | 0x20000 | This value indicates that the recordset object was not saved because it violates the structure of the underlying database. |
adRecDBDeleted | 0x40000 | This value indicates that the recordset object has already been deleted from the data source. |
Use the Status property to see what changes are pending for records modified during batch updating. You can also use the Status property to view the status of records that fail during bulk operations such as when you call the Resync, UpdateBatch, or CancelBatch methods on a recordset object, or set the Filter property on a recordset object to an array of bookmarks. With this property, you can determine how a given record failed and resolve it accordingly.