OpenRecordset

concerns

Calling the OpenRecordset attribute function returnes a reference to a cursor-related ADODB.Recordset.

 

Syntax

OpenRecordset(Command [, CursorType] [, LockType])

Return value

Type

Description

ADODB.Recordset

Recordset Object

Parameter

Use

Name

Type

Passing

Description

Required

Command

String

ByVal

SQL-Statement

Optional

CursorType

CRSCursorType

ByVal

Type of the cursor

Optional

LockType

CRSLockType

ByVal

Lock type with simultaneous access

 

CRSCursorType

Description

2 - CRSCTDynamic

Added, deleted, or modified records become visible. The cursor can be moved in all directions.

0 – CRSCTForwardOnly

The cursor may only be moved forward

1 - CRSCTKeyset

Like a dynamic cursor, however, added or deleted records of other users are not visible. Record changes are always visible.

3 - CRSCTStatic

A static copy of the records when queryed

 

CRSLockType

Description

4 – CRSLTBatchOptimistic

Like CRSLTOptimistic, but also for batch updates

3 – CRSLTOptimistic

The records are locked only for the update function to run

2 – CRSLTPessimistic

The records are locked for other transactions until the recordset is written after a data entry is changed.

1 – CRSLTReadOnly

Records cannot be changed.