|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Update/Delete/Insert Statement in a Custom Node ? |
« View previous topic :: View next topic » |
Author |
Message
|
subhadra |
Posted: Fri May 10, 2002 11:33 pm Post subject: |
|
|
Newbie
Joined: 06 May 2002 Posts: 8
|
Hi All,
In a custom node (written in C), is it not possible to create an SQL object for an Update/Delete/Insert statement(using cniSqlCreateStatement() call) ?? This call throws an exception, and when i print out the tracetext of the exception, it says "Syntax Error". I think, the syntax i am using is correct(for eg. "Delete from Database.Some_table;") . A Select statement on the same tablethru the custom node (like, Select some_column from Database.Some_table) works fine ! so, it cannot be a problem with the schema name, etc.
The MQSI documentation says that the syntax to be used in the custom node for creation of the stmt must follow the rules which apply to the Compute node. Can't an update statement be used in a Compute node? Is that why the custom node also fails ?? If this is so, then what is the purpose of the function cniSqlExecute() ???
Thanking you in anticipation,
Subhadra.
|
|
Back to top |
|
 |
kirani |
Posted: Sat May 11, 2002 12:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I see that you have typed ; after the SQL statement. "Delete from Database.Some_table;"
Try removing the ; and see if is working or not.
You first create your SQL statement using cniSqlCreateStatement function. This function will return a pointer to SQLExpression object. This object is passed to cniSqlExecute and cniSqlSelect functions.
cniSqlExecute function is used for SQLExpressions, which does not return any data. For example your insert, delete, update statements. If your expression is returning data, you should use cniSqlSelect statement.
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|