Progress
DataServer
for ORACLE Guide


ROWID Function

The ROWID data type provides a record identifier that is compatible across Progress and ORACLE databases. Applications that use the ROWID function behave the same way whether they access Progress or ORACLE records.

NOTE: The ROWID function might cause a newly created record to be written earlier to your ORACLE database than to a Progress database. If you do not assign values to all fields that are defined as mandatory in ORACLE for a record, the ROWID function will fail.

By default, the DataServer designates a column to support the ROWID function. It evaluates the indexes available for a table and selects one in the following order:

  1. PROGRESS_RECID column
  2. Unique index on a single, mandatory, NUMBER column with precision < 10 or undefined and scale £ 0 or undefined
  3. Native ROWID

ORACLE does not provide a native ROWID for views that contain aggregates or perform joins. For one of these views to support the ROWID function, use the Data Dictionary to select a NUMBER column, create a unique index based on it, and designate it as the ROWID.

The Data Dictionary allows you to select a different column to support the ROWID function or to select the native ROWID. See the "Defining the ROWID" section in "The DataServer Tutorial," for instructions on changing how a table supports ROWID.

The native ROWID typically provides the fastest access to a record. However, the native ROWID does not support the Progress FIND PREV/LAST statement or cursor repositioning. FIND FIRST/NEXT statements for tables that use the native ROWID as a row identifier have unpredictable results. Qualify the FIND FIRST statement with the USE-INDEX option, as in the following example, to get consistent results across various data sources:

FIND FIRST customer USE-INDEX cust-num. 

ROWID provides the same functionality as the RECID function, but ROWID is more consistent across data sources. Replace the RECID function with ROWID in existing applications.

Follow these guidelines when using ROWID in applications that you want to deploy across several databases, such as DB2, DB2/400, Informix, ORACLE, Progress, and SYBASE:

See the ROWID function entry in the Progress Language Reference for more information and examples.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095