Special Variables

Oratcl stores information related to its operation in the global variable oramsg. The variable is an array and contains the keys described in the following list:

collengths

A list of the column lengths returned by oracols.

colprecs

A list of the precision of the numeric columns returned by oracols.

colscales

A list of the scales of the numeric columns returned by oracols.

coltypes

A list of the types of the columns returned by oracols.

errortxt

The error message text associated with the last SQL command.

handle

The handle of the last Oratcl command.

maxlong

Set to limit the amount of data returned by an orafetch or orareadlong command; default is 32,768 bytes.

nullvalue

String value to return for null results. The default value default will return 0 for numeric types and a null string for others.

ocifunc

The numeric Oracle Call Interface (OCI) status code of the last OCI function performed.

ociinfo

List of features present in Oracle library when Oratcl was compiled.

peo

Parse error offset; index into SQL string that failed due to error.

rc

Numeric Oracle error number associated with the last SQL command (see the following list).

rowid

Row ID of the row affected by SQL insert, update, or delete command.

rows

The number of rows affected by an SQL insert, update, or delete command or number of rows fetched by orafetch.

sqlfunc

The numeric OCI status code of the last SQL function performed.

version

Version of Oratcl.

The following are typical error status values returned in the $oramsg(rc) variable. ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.