DbRead                                                                                                    Function

 

DBREAD(dbName as Database, dbKey as anyVarType, varllist)

 

Description

To read values from the database record identified by the key value into the list of variables as specified by varlist. The database must have been previously opened with DBOPEN. Your varlist must match the datatypes of the fields exactly as they were written out. You cannot skip fields. All variables in the varlist must be variables: they cannot be expressions such as Field.text. Returns an integer result. If the exact key is not found, the next higher key will be returned and the result code will be 2. See DBOPEN for a table of result codes.

 

Example

Dim res as integer

Res=DbRead(CustomerDb, "674", custName, custAddress)