ContentsIndexPreviousNext

A-ORA-DUPLICATE-KEY

This variable determines how Acu4GL for Informix handles the processing of alternate keys with duplicates. When reading on an alternate key with duplicates, it is possible that all records will not be returned. The probability of this scenario increases if the direction of the read changes (for example, switching from read next to read previous).

This generally occurs when:

4gl90003.gif The data set was imported from an external file

4gl90003.gif The database has undergone large amounts of modifications resulting in the re-use of row IDs

4gl90003.gif The initial query returned the record set in some way such that the records are not in row ID order

There are three potential values that can be set for this variable:


Note: These settings could affect performance. If you need assistance, see your Database Administrator.
1. Zero (0): If this variable is set to zero, no ROWID is added to the SELECT statements for reading in a forward direction, but a ROWID is added to SELECT statements for reading in a backward direction if the file is not a VIEW.
Important: Setting this variable to zero (0) is not recommended because ROWIDs may not be in an ascending order. This method can be used if the direction in which the application reads records does not change, but it is unknown if this will work for all situations. This method is provided for backwards compatibility only.
2. One (1): If this variable is set to one (1), a ROWID is added to the ORDER BY clause of all SELECT statements reading tables on an alternate key that allow duplicates. A ROWID is not added if the file is a VIEW. This assures a predictable ordering of keys. This is the default setting.

3. Two (2): If this variable is set to two (2), the primary key segments are added to the ORDER BY clause of all SELECT statements reading tables or VIEWs on an alternate key that allow duplicates.