ReadOnly Property (Data Access)

       

Returns or sets a value that determines whether the control's Database is opened for read-only access.

Syntax

object.ReadOnly [= boolean]

The ReadOnly property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
boolean A Boolean expression that determines read/write access, as described in Settings.

Settings

The settings for value are:

Setting Description
True The control's Database object is opened with read-only access. Changes to data aren't allowed.
False (Default) The control's Database is opened with read/write access to data.

Remarks

Use the ReadOnly property with a Data control to specify whether data in the underlying Database can be changed. For example, you might create an application that only displays data. Accessing a Database using read-only result sets is also faster.

For a Data control, this property is used only the first time a database is opened by your application. If your application subsequently opens other instances of the database, the property is ignored. For a change in this property to take effect, you must close all instances of the database and then use the Refresh method.

In the Professional and Enterprise Editions, this property corresponds to the readonly argument in the OpenDatabase method.

Data Type

Boolean