OpenSQL Reference Guide > OpenSQL Reference Guide > OpenSQL Features > Error Handling > Error Checking Using Inquire Statements
Was this helpful?
Error Checking Using Inquire Statements
There are two inquire statements that can perform error checking: INQUIRE_SQL and INQUIRE_FRS. Both statements return error numbers and the associated error text using the constants errorno and errortext. INQUIRE_SQL returns the error number and text for the last executed OpenSQL database statement. INQUIRE_FRS returns information about the last executed forms statement.
Unlike the WHENEVER statement, an inquire statement must be executed immediately after the database or forms statement in question. The INQUIRE_SQL returns a generic error number in errorno by default. OpenSQL can be directed to return a local error number in errorno. For more information, see Local and Generic Errors.
Neither of the inquire statements suppress the display of error messages. Both of the inquire statements return a wide variety of information in addition to error numbers and text.
For a complete list of the information returned by INQUIRE_SQL, see the chapter "OpenSQL Statements.” For details about INQUIRE_FRS, see the Forms-based Application Development Tools User Guide.
Last modified date: 11/28/2023