ADO Recordset

by Linda Quinn

Close Window        Print Page






A Recordset is a temporary table of data in memory.

A Recordset is created from a Data Store through a Data Provider.



SYNTAX of the Open method.

recordset.Open   Source,  Connection,  CursorType,  LockType,  Options

Source The source of the recordset's data. Usually a table name or a SQL statement.
Connection The connection object defined earlier in the code.
CursorType Access methods:

adOpenDynamic
   - Can find and update data.
   - Can move forward and backward through the recordset.
   - Can see changes made by other users.

adOpenStatic
   - Provides a static copy of the recordset.
   - Can move forward and backward through the recordset.
   - Can NOT see changes made by other users.

adOpenForwardOnly
   - Like the static cursor, except only forward scrolling allowed.

adOpenKeyset
   - Like a dynamic cursor, except other users changes are NOT visible.

LockType adLockReadOnly
   Read-only access

adLockPessimistic
   Provider is responsible for successful editing.

adLockOptimist
   Provider locks records when Update method is invoked.

adLockBatchOptimistic
   For batch updates.

Options adCmdTable
   The Data Source is a table

adCmdText
   The Data Source is a text file.

adCmdStoredProcedure
   The Data Source is a stored procedure.


Print the field names (from first row)


Reference an individual field


Get the rows all at once














Copyright © 2006-2019, LQSystems,Inc. All rights reserved.