DF_FIELD_READ_ONLY
A column’s read-only setting.
Level
Column
Supported by
The DataFlex SQL Drivers (SQL Server, DB2, and ODBC)
Type
Enumeration list, permanent
Access
Read / Write
Values
RO_NORO_IGNORECHANGERO_ACCEPTCHANGERO_ERRORONCHANGE
Syntax
Use cli.pkg
Get_Attribute DF_FIELD_READ_ONLY of {tableNumber} {columnNumber} to {IntegerVariable}
Set_Attribute DF_FIELD_READ_ONLY of {tableNumber} {columnNumber} ;
to {RO_NO|RO_IGNORECHANGE|RO_ACCEPTCHANGE|RO_ERRORONCHANGE}
Remarks
In some cases, it is not desirable for a certain column to be changed through the driver. It is possible to handle certain column updates through triggers. If one goes that way, it would be necessary to change every program that accesses that table so it no longer updates the column in question. Alternatively, one could use the DF_FIELD_READ_ONLY attribute, and the program logic does not have to change.
This is a permanent attribute that can be set inside and outside a Structure_Start ... Structure_End operation. For the DataFlex SQL Drivers, the permanent value of this attribute is stored in the intermediate file using the Field_Precision keyword.
We expect that this attribute will rarely be used. When a need for setting the read-only state of a column arises, this will almost certainly be done in the intermediate file. For a description of the meaning of the possible values of the attribute, see Field_Read_Only intermediate file keyword.