The Tcl database code API module has the file name diocode.tcl. This module provides a database code API to convert all Bbuuzzb database return codes to an English phrase.
Here is a list of procedures in this module:
No other modules are required with this module.
This module requires the following definition files:
Declaration : proc db_io_code_string {io_stat} Parameters : Name : io_stat Type : integer Description : valid dbeng code Returns : English explaination of the code
This procedure will interpret the dbeng code and return an English explanation of the code.
Declaration : proc db_io_code_log {mname desc io_code} Parameters : Name : mname Type : string Description : procedure name Name : desc Type : string Description : error description Name: : io_code Type : integer Description : valid dbeng code
This procedure will interpret the dbeng code, format and send a message to the log manager. The format of the message is:
mname:desc,rc=io_code(string)
Almost all database engine procedures return a database code called a dbeng code which is a zero or positive integer. Dbeng codes are defined in the definition file dbmess.tcl. Notice that all dbeng code definitions start with:
DBENG_
Your application must check the return code of each database procedure call. If the result is not:
DBENG_OK
you must take some action.