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 » URGENT--Update statement in Java Compute Node--Please help--

Post new topic  Reply to topic
 URGENT--Update statement in Java Compute Node--Please help-- « View previous topic :: View next topic » 
Author Message
bhavyabhandari
PostPosted: Mon Jun 25, 2007 10:36 pm    Post subject: URGENT--Update statement in Java Compute Node--Please help-- Reply with quote

Apprentice

Joined: 09 Nov 2006
Posts: 33

How to use the update statement in java compute node by using where condition . I have used the following statement but it is not working

String st1 = "UPDATE Database.ADMINISTRATOR.WIP SET PROCESS_STATUS='ERR' WHERE POL_NO='555'";

MbSQLStatement state = createSQLStatement("BROKERDB",st1, MbSQLStatement.SQL_TRANSACTION_COMMIT);
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Jun 26, 2007 12:13 am    Post subject: Re: URGENT--Update statement in Java Compute Node--Please he Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bhavyabhandari wrote:
I have used the following statement but it is not working


Not working in the not updating sense, not working in the throwing an error sense, not working in the syntax error sense, what?

What is the error / result of the statement, what have you already tried to fix it (so we don't waste time suggesting stuff that's already been ineffective), what version of broker, what platform, what database, etc, etc?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Mensch
PostPosted: Tue Jun 26, 2007 1:14 am    Post subject: Reply with quote

Disciple

Joined: 17 Jul 2005
Posts: 166

I think the problem is with where clause...

Also as Vitor mentioned give us more clues

_________________
Thanks and Regards ,
Mensch
Back to top
View user's profile Send private message
mrgate
PostPosted: Tue Jun 26, 2007 1:43 am    Post subject: Reply with quote

Centurion

Joined: 28 Feb 2007
Posts: 141
Location: India

why cant you go for passthru method instead of passing the query directly to the factory method.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu Apr 02, 2009 1:30 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Try the below code snippet or use the way how i coded

Didnt test this code snippet, but this is the way to achieve it..
/**************************/

String st1 = "UPDATE Database.ADMINISTRATOR.WIP SET PROCESS_STATUS='ERR' WHERE POL_NO='555'";

String query = "SET OutputRoot.MRM.ROW[]=PASSTHRU ('" + st1 + "')";
try{
MbSQLStatement updateStatement = createSQLStatement(dsnName, query, MbSQLStatement.SQL_TRANSACTION_AUTO);
updateStatement.execute(tempAssembly);
}
catch(Exception e)
{
throw new Exception(e);
}

/**************************/
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » URGENT--Update statement in Java Compute Node--Please help--
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.