CdbQueryDef::OpenRecordset Method

Creates a new Recordset object and appends it to the Recordsets collection.

Syntax

CdbRecordsetOpenRecordset(LONG lType=-1,

LONG lOption=-1,

LONG lLockType=-1);

Parameters

Type Example Description
LONG lType Optional. A constant that indicates the type of Recordset to open, as specified in Settings in the core topic.
LONG lOption Optional. A combination of constants that specify characteristics of the new Recordset, as listed in Settings in the core topic.
LONG lLockType Optional. A constant that determines the locking for the Recordset, as specified in Settings in the core topic.

Usage

#include <afxole.h>
#include <dbdao.h>

CdbQueryDef      qd;
CdbRecordset      rst;
...               // Initialize qd, etc.
rst = qd.OpenRecordset( dbOpenDynaset, dbDenyWrite, dbPessimistic);