Determines one or more characteristics of the Dynaset in the control's Recordset property. Read/write at design time and run time.
[form.] datacontrol.Options [ = numericexpression ]
The Options property settings are:
Constant Value Description
DB_DENYWRITE 1 In a multiuser environment, others cannot make changes to records in the Dynaset.
DB_READONLY 4 You cannot make changes to records in the Dynaset.
DB_APPENDONLY 8 You can add new records to the Dynaset, but you cannot read existing records.
DB_INCONSISTENT 16 Updates can apply to all fields of the Dynaset, even if they also affect other records in the Dynaset.
DB_CONSISTENT 32 (Default) Updates apply only to those fields that will not affect other records in the Dynaset.
DB_SQLPASSTHROUGH 64 When using data controls with an SQL statement in the RecordSource property, sends the SQL statement through to an ODBC database, such as a SQL Server or Oracle database for processing.
These values are from the Visual Basic file DATACONS.TXT.
If you change this property at run time, you must use the Refresh method for the change to have any effect.
In the Professional Edition, this property corresponds to the options argument in the CreateDynaset method.
To set more than one value for this property, you can combine them by adding values together. For example, to set both DB_READONLY and DB_INCONSISTENT you could use this code:
Data1.Options = DB_READONLY + DB_INCONSISTENT
To determine if the property contains a specific value, you can use the And operator. For example, to determine if the recordset is opened for read-only access, you could use this code:
If Data1.Options And DB_READONLY Then...
If both DB_INCONSISTENT and DB_CONSISTENT values are used, the result is consistent updates, which is the default for Dynaset objects.