WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
cniSqlCreateStatement
Use this function to create an ESQL expression object that represents the statement specified by the statement argument, by using the syntax defined for the Compute node.
You cannot use the following statements:
- CREATE PROCEDURE
- CREATE MODULE
- CREATE SCHEMA
- CREATE FUNCTION
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 value is the default.
- CCI_SQL_TRANSACTION_COMMIT
- Specifies that a commit is performed after execution of the statement, and in 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 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.