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 » ESQL INSERT data into table (DB2)

Post new topic  Reply to topic
 ESQL INSERT data into table (DB2) « View previous topic :: View next topic » 
Author Message
syangloo
PostPosted: Thu May 19, 2005 3:08 am    Post subject: ESQL INSERT data into table (DB2) Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Dear All,

I try to insert two data into one simple table as per below
Table name = TRANSACTION_ID
Field = TXNID, RQUID

Below is my ESQL to insert those data into DB
Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE MID CHARACTER;
DECLARE rquid CHARACTER;

Set MID = OutputRoot.MQMD.MsgId;
--Set rquid = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID);
INSERT INTO Database.TRANSACTION_ID(TXNID,RQUID) VALUES (RTRIM(MID),RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID));
--SET OutputLocalEnvironment = InputLocalEnvironment;


I can deploy this compunote succeffully into broker.

But i getting the error BIP2322E when i run the Message Flow.

Any idea where is the problem?

Regards
Syangloo
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Thu May 19, 2005 3:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

We need the rest of the error message. BIP2322E is a generic SQL error, the inserts will tell you what's wrong.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
nathanw
PostPosted: Thu May 19, 2005 3:24 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

obvious query but have yu set the database in the compute node properties

if you have not set the database you cannot insert as the node does not know which database to connect to and therefore cannot insert the values
Back to top
View user's profile Send private message MSN Messenger
syangloo
PostPosted: Fri May 20, 2005 7:13 pm    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Below is the Error message i get it from the MQI version 2.1 messages reference.

Quote:
BIP 2322E Database error: SQL State &1'; Native Error Code '&2'; Error Text '&3'.

Explanation: The error has the following diagnostic information:
SQL State '&1'
SQL Native Error Code '&2'
SQL Error Text '&3'

User Response: This message may be accompanied by other mewssage describring the effect on the message broker itself. Use the reason identified in this message with the accompanying message to determine the cause of the error.


Any way i can get more info abt this error?

Yes i already add the DB name and table name in the compute node. Deployment is successful, error occure at when the message pass by the compute node.

Regards
Syangloo[/img]
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Sat May 21, 2005 4:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Look at the database logs.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
syangloo
PostPosted: Sat May 21, 2005 9:44 am    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Below is the error log from the Win2k Event viewer

Quote:


( QMBKKL001.RQRP ) Database error: ODBC return code '-1'.

The message broker encountered an error whilst executing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database pertaining to this error.

Use the following messages to determine the cause of the error. This is likely to be such things as incorrect datasource or table names. Then correct either the database or message broker configuration.

( QMBKKL001.RQRP ) (1, 1) : Error executing SQL statement 'INSERT INTO TRANSACTION_ID(MSGID, RQUID) VALUES(?, ?)' against datasource 'QMRQRPDB' with parameters ''X'414d5120514d2e4956522e4b4c2e3030b936854232e00000'', 'Loo008-7-18C4-46EF-9F5B-43F19F95B47D', '.

The following error occurred during execution of a database SQL statement against datasource 'QMRQRPDB'. The SQL statement was 'INSERT INTO TRANSACTION_ID(MSGID, RQUID) VALUES(?, ?)'. The parameters passed were ''X'414d5120514d2e4956522e4b4c2e3030b936854232e00000'', 'Loo008-7-18C4-46EF-9F5B-43F19F95B47D', '.

( QMBKKL001.RQRP ) Error detected whilst processing a message in node 'AFFIN REQUEST FLOW.Set MsgID'.

The message broker detected an error whilst processing a message in node 'AFFIN REQUEST FLOW.Set MsgID'. An exception has been thrown to cut short the processing of the message.

See the following messages for details of the error.

( QMBKKL001.RQRP ) Exception condition detected on input node 'AFFIN REQUEST FLOW.Q.REQUESTS.BROKERED'.

The input node 'AFFIN REQUEST FLOW.Q.REQUESTS.BROKERED' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.

Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.



Now i change the TXNID (same as MSGID above) to 54 byte.
It inserting the data into table, thanks for you help.

Regards
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL INSERT data into table (DB2)
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.