Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
tdbc::mapSqlState(n)	   Tcl Database	Connectivity	  tdbc::mapSqlState(n)

______________________________________________________________________________

NAME
       tdbc::mapSqlState - Map SQLSTATE	to error class

SYNOPSIS
       package require tdbc 1.0

       tdbc::mapSqlState sqlstate
______________________________________________________________________________

DESCRIPTION
       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  er-
       ror occurs. It examines the first two characters	of the string, and re-
       turns an	error class as a human-	and machine-readable name  (for	 exam-
       ple, FEATURE_NOT_SUPPORTED, DATA_EXCEPTION or INVALID_CURSOR_STATE).

       The  TDBC  specification	requires database drivers to return a descrip-
       tion of an error	in the error code when an error	occurs.	 The  descrip-
       tion is a string	that has at least four elements: "TDBC errorClass sql-
       state 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.

SEE ALSO
       tdbc(n),	  tdbc::tokenize,   tdbc::connection(n),   tdbc::statement(n),
       tdbc::resultset(n)

KEYWORDS
       TDBC, SQL, database, state

COPYRIGHT
       Copyright (c) 2009 by Kevin B. Kenny.

Tcl				      8.6		  tdbc::mapSqlState(n)

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | KEYWORDS | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=tdbc_mapSqlState&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help