Recordset Open Method Options

The Open method of the Recordset Object can take several different enumerations, the details of which are described in the following tables.

CursorTypeEnum Members

Member

Value

Description

adOpenUnspecified

-1

Hidden. No cursor type is specified.

adOpenForwardOnly

0

Default. Specifies a forward-only cursor. This is similar to a static cursor, except that you can only scroll forward through the records.

adOpenKeyset

1

Specifies a keyset cursor. This is similar to a dynamic cursor, except that records added by other users are not reflected in your recordset; however, records that other users delete are inaccessible in your recordset.

adOpenDynamic

2

Specifies a dynamic cursor. In this cursor type, all additions, deletions, and modifications made by other users are visible in your recordset, and all types of row movement are allowed. If the provider supports bookmarks, they too are allowed.

adOpenStatic

3

Specifies a static cursor. This cursor type is readonly, and additions, deletions, and modifications made by other users are invisible in your recordset.

LockTypeEnum Members

Member

Value

Description

adLockUnspecified

-1

. A lock type is not specified. Clones are created with the same lock type as their original.

adLockReadOnly

1

Specifies a read-only recordset.

adLockPessimistic

2

Specifies pessimistic locking at record-level.

adLockOptimistic

3

Specifies pessimistic locking at record-level. The record is locked only when you call the Update method.

adLockBatchOptimistic

4

Specifies optimistic locking for batch updated.

0 0

Post a comment