DBSTATUS(Str1, Str2, Str3, Str4)
String Expression
Performs a database lookup and returns an error message if an error is found (e.g., Access file does not exist, Table does not exist, or No match found).
- Str1 = Full name of database file
- Str2 = Name of Table
- Str3 = Selection of record criteria (specifying names of matching identifiers)
- Str4 = Name of field whose value is wanted
Example:
DBSTATUS("C:\lookup.mdb", "TblLocations", CONCAT("ID=", SUBJECT), "Autos")
The example above will look in the “TblLocations” table of the lookup database for a record where the value of the ID field matches the variable SUBJECT. If found, and there is a field named AUTOS in the table, an empty string will be returned. Otherwise, a message describing the error will be returned.
Note: Not supported by the Web Module.