• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Troubleshooting

Making ADODB.Recordsets Updatable

Q1:I've opened a Connection and Recordset, but the Recordset is read-only. I can't edit, add, or delete records.
The most likely culprit is either forgetting to specify a read-write CursorType property value (adKeyset, adDynamic, adStatic) or not setting the LockType property value to adLockOptimistic or adLockPessimistic. Unlike DAO.Recordset objects, which default to a Recordset of the dynaset type, ADODB.Recordsets default to a forward-only (firehose) cursor with read-only locking.
Q2:I fixed the CursorType or LockType problem, but my Recordset still isn't updatable.
The underlying query isn't updatable. Import your SQL statement into Access's SQL Query window to create a temporary query. Run the query and check whether the tentative append record appears and whether you can edit the values of fields that you want to alter with your form. If the query has INNER JOINs and runs against MSDE or SQL Server, make sure that you've specified the correct name for the UniqueTable property.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint