Use this procedure/function to retrieve the first record in a database table.
DBFirstRec (Table, PrefixVariable)
Parameter |
Description |
Table |
Enter the name of an open table. |
PrefixVariable |
Enter the name of a DAL variable to associate with the record fields retrieved by the procedure. The default is Table. |
The system optionally returns one (1) on success or zero (0) on failure.
If the PrefixVariable parameter has not been defined, it will be created. You can access the table record fields assigned this prefix using the dot (.) operator.
For example, assume Record is a prefix variable and the table record contains the columns Company, Lob, and Policynum. The values of the individual fields would be referenced as Record.Company, Record.Lob, and Record.Policynum, respectively.
The actual variable names appended with a prefix are taken from the DFD file associated with the table you specified in the Table parameter or using the column names found in the table if there is no DFD file associated with the table.
Possible causes for failure to retrieve the first record include:
Here is an example:
Procedure |
Result |
Explanation |
DBFirstRec ( "APPIDX" , "RECORD" ) |
1 or 0 |
Retrieves the first record from the APPIDX table and associates the columns with the prefix variable RECORD. |
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.