tdbc_mapSqlState(3tcl)

tdbc_mapSqlState3tcl

Map sqlstate to error class

Usage

package require tdbc 1.0
tdbc::mapSqlState sqlstate

    


    


    

Overview

The tdbc::mapSqlState command accepts a string that is expected to be a five-character 'SQL state' as returned from a SQL database when an error occurs. It examines the first two characters of the string, and returns an error class as a human- and machine-readable name (for example, FEATURE_NOT_SUPPORTED, DATA_EXCEPTION or INVALID_CURSOR_STATE).

The TDBC specification requires database drivers to return a description of an error in the error code when an error occurs. The description is a string that has at least four elements: "TDBC errorClass sqlstate driverName details...". The tdbc::mapSqlState command gives a convenient way for a TDBC driver to generate the errorClass element given the SQL state returned from a database.

Keywords

TDBC, SQL, database, state

Releases

6 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8
  2. 9–11
  3. 12–13

From tcl8.6-tdbc 1.1.10-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.