WebSphere Message Brokers
File: ak17970_
Writer: Bill Oppenheimer

Reference topic

This build: July 31, 2007 21:32:55

SQLERRORTEXT function

SQLERRORTEXT is a database state function that returns a CHARACTER data type with a default value of '' (empty string).

Syntax

Within a message flow, you can access and update an external database resource using the available ESQL database functions in the Filter, Database, and Compute nodes. When making calls to an external database, you might get errors, such as a table does not exist, a database is not available, or an insert for a key that already exists.

When these errors occur, the default action of the broker is to generate an exception. This behavior is determined by how you have set the property Throw exception on database error. If you have selected this check box, the broker stops processing the node, propagates the message to the node's failure terminal, and writes the details of the error to the ExceptionList. If you want to override the default behavior and handle a database error in the ESQL in the node, clear the Throw exception on database error check box. The broker does not throw an exception and you must include the THROW statement to throw an exception if a certain SQL state code is not expected. See THROW statement for a description of THROW.

If you choose to handle database errors in a node, you can use the database state function SQLERRORTEXT to receive information about the status of the DBMS call made in ESQL. You can include it in conditional statements in current node's ESQL to recognize and handle possible errors.

Related concepts
Message flows overview
ESQL overview
Related tasks
Defining message flow content
Developing ESQL
Capturing database state
Related reference
SQLCODE function
SQLNATIVEERROR function
SQLSTATE function
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:32:55

ak17970_ This topic's URL is: