Attribute

ReadOnly (ro)

Purpose

Specifies whether the connection has read-only access to the data source.

Valid Values

0 | 1

Behavior

If set to 1 (true), the connection has read-only access. The following commands are the only commands that you can use when a connection is read-only:

  • Explain Plan

  • Select (except Select Into)

  • Set Schema

The driver returns an error if any other command is used.

If set to 0 (false), the connection is opened for read/write access, and you can use all commands supported by the product.

Caution:Before disabling the ReadOnly connection property, it is critical to confirm that all values in the primary key column are unique. Executing write operations against data with duplicate primary keys can produce unpredictable and undesirable results.

Default Value

1 (true)