ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Update/Delete/Insert Statement in a Custom Node ?

Post new topic  Reply to topic
 Update/Delete/Insert Statement in a Custom Node ? « View previous topic :: View next topic » 
Author Message
subhadra
PostPosted: Fri May 10, 2002 11:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Sat May 11, 2002 12:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Update/Delete/Insert Statement in a Custom Node ?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.