Progress/400
Product Guide
ROWID Function
In Progress, you can create a ROWID without creating a record. In DataServer applications, creating a ROWID creates a record. The following statement illustrates the difference in behavior:
The DataServer creates a customer record using default values. After the user assigns values to the fields in that record, the DataServer updates it. When you UNDO the transaction, the DataServer deletes the record.
If you have a unique index on that file, two users cannot access the default value of the indexed field simultaneously.
The value returned by the ROWID function is the DB2/400 relative record number (RRN) of the database record currently associated with the specified record buffer. Therefore, the value is not unique across all records in the database, but it is unique across all records of its associated file. You can use ROWID in Progress/400 as you do in standard Progress with the following additional restrictions:
- In standard Progress, when you delete a record and then UNDO the delete transaction, the ROWID value remains the same because Progress reserves the ROWID value in the database until it commits the transaction.
- In Progress/400, the ROWID value can change during a delete transaction because the record is deleted from the database before the transaction is committed, and without holding a place in the database. When the rollback (UNDO) occurs, the record is added back into the file.
- For virtual table ROWID considerations, see the "Virtual Tables" section.
- ROWID provides the same functionality as RECID, but ROWID is more consistent across data sources.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |