Name
| Required/optional
| Data type
| Description
|
---|---|---|---|
Name
| Required
| String
| The source of the records for the new Recordset. The source can be a table name, a query name, or an SQL statement that returns records. For table-type Recordset objects in Microsoft Access database engine databases, the source can only be a table name.
|
Type
| Optional
| Variant
| A RecordsetTypeEnum constant that indicates the type of Recordset to open.
NOTE: If you open a Recordset in a Microsoft Access workspace and you don't specify a type, OpenRecordset creates a table-type Recordset, if possible. If you specify a linked table or query, OpenRecordset creates a dynaset-type Recordset.
|
Options
| Optional
| Variant
| A combination of RecordsetOptionEnum constants that specify characteristics of the new Recordset.
NOTE: The constants dbConsistent and dbInconsistent are mutually exclusive, and using both causes an error. Supplying a lockedits argument when options use the dbReadOnly constant also causes an error.
|
LockEdit
| Optional
| Variant
| A LockTypeEnum constant that determines the locking for the Recordset.
NOTE: You can use dbReadOnly in either the options argument or the lockedits argument, but not both. If you use it for both arguments, a run-time error occurs.
|
Note
If source refers to an SQL statement composed of a string concatenated with a non-integer value, and the system parameters specify a non-U.S. decimal character such as a comma (for example, strSQL = "PRICE > " & lngPrice, and lngPrice = 125,50), an error occurs when you try to open the Recordset. This is because during concatenation, the number will be converted to a string using your system's default decimal character, and SQL only accepts U.S. decimal characters.
|