Name

recordset.Open([Source], [ActiveConnection], [CursorType] , [LockType] , [Options])

Synopsis

Opens the recordset for database operations.

Argument

Description

Source

The source of the recordset. The source can be a Command object, an SQL statement, a table name, a stored procedure call, a URL, or the name of a file or Stream object.

ActiveConnection

A Connection object or connection string.

CursorType

The type of database cursor to use for the recordset. The cursor can be adOpenDynamic, adOpenForwardOnly (default), adOpenKeyset, adOpenStatic, or adOpenUnspecified.

LockType

The type of locking to use for the recordset. The cursor can be adLockBatchOptimistic, adLockOptimistic, adLockPessimistic, adLockReadOnly, or adLockUnspecified.

Options

A constant specifying how a command source should be interpreted or executed.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.