5. Embedded OpenSQL : Data Handlers for Large Objects : Errors in Data Handlers
 
Share this page                  
Errors in Data Handlers
Errors from PUT DATA and GET DATA statements are raised immediately, and abort the SQL statement that invoked the data handler. If an error handler is in effect (as the result of a SET_SQL(ERRORHANDLER) statement), the error handling routine is called.
The data handler read routines (routines that issue get data statements) must issue the ENDDATA statement before exiting. If a data handler routine attempts to exit without issuing the ENDDATA statement, a runtime error is issued.
To determine the name of the column for which the data handler was invoked, use the INQUIRE_SQL(columnname) statement. To determine the data type of the column, use the INQUIRE_SQL(columntype) statement. The INIQUIRE_SQL(columntype) statement returns an integer code corresponding to the column data type (see Data Type Codes). These INQUIRE_SQL statements are valid only within a data handler routine. Outside of a data handler, these statements return empty strings.