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 » Calling Oracle - vaiables not passed through

Post new topic  Reply to topic
 Calling Oracle - vaiables not passed through « View previous topic :: View next topic » 
Author Message
nickkirk
PostPosted: Wed Mar 05, 2014 3:01 am    Post subject: Calling Oracle - vaiables not passed through Reply with quote

Apprentice

Joined: 26 Sep 2008
Posts: 48

I'm calling an Oracle db from WMB v7, running on Solaris.
WMB effective level '7.0.0.1'.

1)
DECLARE productdefid2 CHARACTER 'EMAIL';
DECLARE mqMsgRef2 CHARACTER '140304164501000263';

SET Environment.additionalFields[] =
SELECT T.mq_msg_id
FROM Database.fax_monitor AS T
WHERE T.sys_ref_typ = productdefid2
AND T.mq_msg_id = mqMsgRef2;

Trace File shows:
"SELECT T.mq_msg_id FROM fax_monitor T WHERE ((T.sys_ref_typ)=(?))AND((T.mq_msg_id)=(?))"


and Environment.additionalFields is NOT populated

2)

SET Environment.additionalFieldsTest[] =
SELECT T.mq_msg_id
FROM Database.fax_monitor AS T
WHERE T.sys_ref_typ = 'EMAIL'
AND T.mq_msg_id = '140304164501000263';

Trace File shows:
"SELECT T.mq_msg_id FROM fax_monitor T WHERE ((T.sys_ref_typ)=('EMAIL'))AND((T.mq_msg_id)=('140304164501000263'))"

and Environment.additionalFieldsTest gets populated as expected


Why aren't the variables being passed through ?
Please help.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Mar 05, 2014 5:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Looks like in one case you are getting a prepared statement, in the other you are getting a litteral statement... Does this answer your question?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
nickkirk
PostPosted: Wed Mar 05, 2014 7:57 am    Post subject: Reply with quote

Apprentice

Joined: 26 Sep 2008
Posts: 48

fjb_saper wrote:
Looks like in one case you are getting a prepared statement, in the other you are getting a litteral statement... Does this answer your question?



No it doesn't.

Do you know why 1) would not work ?
Back to top
View user's profile Send private message Send e-mail
Tibor
PostPosted: Thu Mar 06, 2014 4:34 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

In this case I would switch the ODBC tracing on.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 06, 2014 6:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you tried writing your select statement like:
Code:
where field1 = :variable1 and field2 = :variable2

The colon before the variable name might be important... I'm looking at the way the prepared statement was done and the trace did not show variables beeing provided .... Although this syntax might be more suited to a passthru query I would still try it and see if it makes a difference...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling Oracle - vaiables not passed through
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.