Tcl Database Codes API

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:

- db_io_code_string
- db_io_code_log

# Module Dependencies

No other modules are required with this module.

# Module Definition Files

This module requires the following definition files:

- stdhead.tcl
- dbmess.tcl

# Module Procedures

## db_io_code_string

    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.

## db_io_code_log

    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)

# Dbeng Codes

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.

Goto Top | Tcl Database Engine and API's | Tcl Applications | Tcl Software Overview | Tcl Library Overview
| Future Lab Home | Contact Webmaster | Feedback

Copyright © 2006 Future Lab, Last Updated Jul 01, 2006