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. Refer to the Oracle documentation for an exhaustive set of codes and messages.

0

Normal command completion; no error.

900–999

Invalid SQL statements, keywords, column names, etc.

1000–1099

Program interface error.

1400–1499

Execution errors or feedback.

1403

End of data reached on orafetch command.

1406

Column fetched by orafetch command was truncated.

3123

Asynchronous execution is pending completion (not an error).

One or more of the following features can be returned in the $oramsg(ociinfo) variable:

version_6

Compiled under Oracle version 6

version_7

Compiled under Oracle version 7

non_blocking

Supports nonblocking SQL execution

cursor_variables

Supports PL/SQL cursor variables

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset