Purpose
Creates a new Recordset object
Parameters
liType | (Optional) A constant that indicates the type of Recordset to open, as specified under Settings. |
liOptions | (Optional) A combination of constants that specify characteristics of the new Recordset, as listed under Settings |
Returns
A recordset object
Remarks
From a dynaset- or snapshot-type Recordset, the new Recordset is of the same type. From a table-type Recordset object, the type of the new object is a dynaset-type Recordset. You can't open new Recordset objects from forward-onlytype or ODBCDirect Recordset objects.
Settings
You can use one of the following constants for the IiType argument
Constant | Description |
dbOpenTable | Opens a table-type Recordset object (Microsoft Jet workspaces only). |
dbOpenDynamic | Opens a dynamic-type Recordset object, which is similar to an ODBC dynamic cursor. (ODBCDirect workspaces only) |
dbOpenDynaset | Opens a dynaset-type Recordset object, which is similar to an ODBC keyset cursor. |
dbOpenSnapshot | Opens a snapshot-type Recordset object, which is similar to an ODBC static cursor. |
dbOpenForwardOnly | Opens a forward-only-type Recordset object. |
You can use a combination of the following constants for the IOptions argument.
Constant | Description |
dbAppendOnly | Allows users to append new records to the Recordset, but prevents them from editing or deleting existing records (Microsoft Jet dynaset-type Recordset only). |
dbSQLPassThrough | Passes an SQL statement to a Microsoft Jet-connected ODBC data source for processing (Microsoft Jet snapshot-type Recordset only). |
dbSeeChanges | Generates a run-time error if one user is changing data that another user is editing (Microsoft Jet dynaset-type Recordset only). This is useful in applications where multiple users have simultaneous read/write access to the same data. |
dbDenyWrite | other users from modifying or adding records (Microsoft Jet Recordset objects only). |
dbDenyRead | Prevents other users from reading data in a table (Microsoft Jet table-type Recordset only). |
dbForwardOnly | Creates a forward-only Recordset (Microsoft Jet snapshot-type Recordset only). It is provided only for backward compatibility, and you should use the dbOpenForwardOnly constant in the liType argument instead of using this option. |
dbReadOnly | Prevents users from making changes to the Recordset (Microsoft Jet only). The dbReadOnly constant in the lLockEdits argument replaces this option, which is provided only for backward compatibility. |
dbRunAsync | Runs an asynchronous query (ODBCDirect workspaces only). |
dbExecDirect | Runs a query by skipping SQLPrepare and directly calling SQLExecDirect (ODBCDirect workspaces only). Use this option only when you're not opening a Recordset based on a parameter query. For more information, see the "Microsoft ODBC 3.0 Programmer's Reference." |
dbInconsistent | Allows inconsistent updates (Microsoft Jet dynaset-type and snapshot-type Recordset objects only). |
dbConsistent | only consistent updates (Microsoft Jet dynaset-type and snapshot-type Recordset objects only). |
Class
See Also