Try OpenEdge Now
skip to main content
DataServer for Oracle
The DataServer Tutorial : Modifying a schema image : Defining the ROWID
 

Defining the ROWID

When you create or update a schema image, the DataServer uses the following guidelines when determining how to support the ROWID function:
*If the Oracle table has a PROGRESS_RECID column, the DataServer selects it. This column provides the optimal support for the ROWID function. You cannot select an alternative to it.
*If the Oracle table does not have a PROGRESS_RECID column, the DataServer selects a unique index on a mandatory NUMBER column with precision < 10 or undefined and a scale of 0 or undefined.
*If none of the above is available, the DataServer uses the native ROWID.
The Data Dictionary allows you to select the native ROWID or an alternative index to support the ROWID function. The alternative index should be a stable one.
Note: If you are connected to an Oracle database and you change how the ROWID is supported for a table, you must reconnect to the database to avoid inconsistent row identifiers.
An index that you select to support ROWID must meet the following database- and application-level criteria:
The database criteria are:
*The index consists of a single field.
*The indexed column is a NUMBER data type.
The application criteria are:
*The index must at least be treated as unique by your application.
*The index must at least be treated as mandatory in your application.
*The indexed column only allows values with fewer than ten digits (for applications associated with an OpenEdge 10.1A Release or earlier).
*The indexed column only allows values with fewer than nineteen digits (for applications associated with an OpenEdge 10.1B Release or earlier).
The Oracle DataServer allows you to select indexes that meet only the first two database-related requirements, but your application must ensure that the index meets the remaining criteria.
For example, your application might access an indexed column defined as a NUMBER column, but the scale might not be specified. If your application assigns only values between 1 and 214783647 to this column, it meets one of the additional criteria. Your application must ensure that the indexed column meets the other two criteria as well. If you do not meet all three criteria, you risk corrupting your database.
To select an index to support the ROWID function, in the Data Dictionary:
1. Select the table from the Tables list.
2. Choose the Table Properties button.
3. Choose the DataServer button. If the Oracle table contains a PROGRESS_RECID column, the following message appears:
4. If the PROGRESS_RECID message did not appear, the ROWID Choices dialog box appears:
5. Choose <native ROWID> or an index to support the ROWID function. Choose OK to return to the Table Properties dialog box.
6. Choose OK to return to the Data Dictionary.
7. If you referenced the table during the current session, you must disconnect from Oracle, then reconnect, for the ROWID selection to take effect.