WebSphere Message Brokers
File: as08000_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:37:44

cniSqlCreateStatement

Creates an SQL expression object representing the statement specified by the statement argument, using the syntax as defined for the Compute message flow processing node, with the exception that you are not allowed to use:
  • CREATE PROCEDURE
  • CREATE MODULE
  • CREATE SCHEMA
  • CREATE FUNCTION
This function returns a pointer to the SQL expression object, which is used as input to the functions that execute the statement, namely cniSqlExecute and cniSqlSelect. You can create multiple SQL expression objects in a single message flow processing node. Although you can create these objects at any time, you would typically create them when the message flow processing node is instantiated, within the implementation function cniCreateNodeContext.

Syntax

CciSqlExpression* cniSqlCreateStatement(
  int*               returnCode,
  CciNode*           nodeObject,
  CciChar*           dataSourceName,
  CciSqlTransaction  transaction,
  CciChar*           statement);

Parameters

returnCode
The return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_NODE_OBJECT
  • CCI_INV_TRANSACTION_TYPE
  • CCI_INV_STATEMENT
nodeObject
The message flow processing node that the SQL expression object is owned by (input). This pointer is passed to the cniCreateNodeContext implementation function.
dataSourceName
The ODBC data source name used if the statement references data in an external database (input).
transaction
Specifies whether a database commit is performed after the statement is executed (input). Valid values are:
CCI_SQL_TRANSACTION_AUTO
Specifies that a database commit is performed at the completion of the message flow (that is, as a fully globally coordinated or partially globally coordinated transaction). This is the default.
CCI_SQL_TRANSACTION_COMMIT
Specifies that a commit is performed after execution of the statement, and within the cniSqlExecute or cniSqlSelect function (that is, the message flow is partially broker coordinated).
statement
The SQL expression to be created, using the syntax as defined for the compute message flow processing node (input).

Return values

If successful, the address of the SQL expression object is returned. If an error occurs, zero (CCI_NULL_ADDR) is returned, and the returnCode parameter indicates the reason for the error.

Notices | Trademarks | Downloads | Library | Support | Feedback

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

as08000_ This topic's URL is: