Progress/400
Product Guide
Record Creation
Records are created differently when you use the Progress 4GL against DB2/400 database files rather than against a standard Progress database.
The Progress RDBMS attempts to create a record when the fields that make up the index are supplied. If the entry is a duplicate key, the duplicate key error is detected immediately and the record creation fails.
The Progress/400 DataServer attempts to create a record at the end of a transaction block. If the entry is a duplicate key, the duplicate key error is detected and the record creation fails. To make your DataServer applications behave more like a Progress database, use the RELEASE or VALIDATE statements once all key field values are provided.
The following code samples illustrate how differences in record creation might affect your applications and shows how to code around them:
In this example:
To obtain standard Progress behavior against a DB2/400 database, use VALIDATE or RELEASE, as shown in this code:
Using the RELEASE statement might not be appropriate for all applications. When you release the record, you lose your lock on it and run the risk of another user locking the record before you are done with it. Also, if a release statement is issued in a subtransaction, the lock is not released until the end of the main transaction.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |