Database Cursor VBA (Visual Basic for Applications)

Database Cursor VBA (Visual Basic for Applications)

Cursor

CursorType: ADODB Recordset object exposes CursorType property which takes following cursor types derived from CursorTypeEnum. CursorType property is used to specify the type of cursor that should be used when opening the Recordset object.:

  1. adOpenForwardOnly: its default cursor type, ensures the cursor moves forward in the recordset
  2. adOpenKeyset: supported methods adBookmarkadHoldRecordsadMovePreviousadResync
  3. adOpenDynamic: adMovePrevious
  4. adOpenStatic: Supported methods adBookmarkadHoldRecordsadMovePreviousadResync. CursorLocation must be set to adUseClient

adUpdateBatch may be true for dynamic and forward-only cursors, for batch updates you should use either a keyset or static cursor. Set the LockType property to adLockBatchOptimistic and the CursorLocation property to adUseClient to enable the Cursor Service for OLE DB, which is required for batch updates.

Please leave your comments or queries under comment section also please do subscribe to out blogs to keep your self upto date.

Leave a Reply

Your email address will not be published.