Progress
DataServer
for ORACLE Guide
Record Creation
Record creation behavior differs between a Progress database and an ORACLE database accessed through the DataServer. The following code fragments provide examples of the different behavior.
If you have a table called cust with a field called cust-num defined as an indexed field, and you write the following procedure:
- Progress — Does not create the record right away (at the CREATE statement). It writes it to the database at the end of the record scope or when the index information is supplied. In this example, Progress writes the record after the statement
cust-num = 10
.- DataServer for ORACLE — Writes the record later than Progress does; it writes it at the end of the record scope.
Another example of the differences between Progress and the DataServer occurs if you write a procedure similar to the following:
To get the correct response from the DataServer, use this program:
In this example, however, using a VALIDATE statement causes the DataServer to write the record to the database. The VALIDATE statement causes the DataServer to write the record that contains customer 111 to the database before the FIND statement occurs. The RELEASE statement also causes the DataServer to write the record to the database; however the RELEASE statement clears the contents of buffers.
NOTE: Using the ROWID function might cause a newly created record to be written earlier to an ORACLE database than to a Progress database. If you don’t assign values to all mandatory fields for a record, the ROWID function will fail.This difference in behavior might also be apparent when you open a query. Newly created records might not appear in the results set of queries that you opened before you created the records. Reopen the query to access the new records.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |