DBNextRec

Use this procedure/function to retrieve the next record in sequence from a database table.

Syntax

DBNextRec (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.

If the record cannot be retrieved, possible causes include:

Example

Here is an example:

Procedure

Result

Explanation

DBNextRec ( "APPIDX" , "RECORD" )

1 or 0

Will retrieve the next record from the table APPIDX and associate the field columns with the prefix variable RECORD.

See also