|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
URGENT--Update statement in Java Compute Node--Please help-- |
« View previous topic :: View next topic » |
Author |
Message
|
bhavyabhandari |
Posted: Mon Jun 25, 2007 10:36 pm Post subject: URGENT--Update statement in Java Compute Node--Please help-- |
|
|
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 |
|
 |
Vitor |
Posted: Tue Jun 26, 2007 12:13 am Post subject: Re: URGENT--Update statement in Java Compute Node--Please he |
|
|
 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 |
|
 |
Mensch |
Posted: Tue Jun 26, 2007 1:14 am Post subject: |
|
|
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 |
|
 |
mrgate |
Posted: Tue Jun 26, 2007 1:43 am Post subject: |
|
|
 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 |
|
 |
Gaya3 |
Posted: Thu Apr 02, 2009 1:30 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|