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 » MB v6 - How to access multiple Databases

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 MB v6 - How to access multiple Databases « View previous topic :: View next topic » 
Author Message
mgk
PostPosted: Tue Jul 04, 2006 5:55 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
I'm at a loss here. I've searched thru the manuals and other posts on this site and I have yet to see an example where someone is using both dynamic data sources with input parameters to a query.


To do this you need to use the VALUES clause. See the PASSTHRU syntax diagram in the manual.

From the Manual entry for PASSTHHRU:
Quote:
If the VALUES clause is specified, its expressions are evaluated and passed to the database as parameters; (that is, their values are substituted for the question marks in the database statement).



Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
shrek
PostPosted: Wed Jul 05, 2006 9:22 am    Post subject: Reply with quote

Acolyte

Joined: 19 Feb 2005
Posts: 61
Location: Gudivada,India

I had success doing the following

DECLARE dsnName NAME TRIM(InputRoot.XML.Test.DataSource);
DECLARE sqlStmt CHAR TRIM(InputRoot.XML.Test.Statement);

Quote:
/*!{SET Environment.Variables.SQLResult[] = PASSTHRU(sqlStmt TO Database.dsnName);}!*/


Thanks.
Back to top
View user's profile Send private message
moogoo
PostPosted: Wed Jul 05, 2006 11:40 am    Post subject: Reply with quote

Acolyte

Joined: 20 Sep 2002
Posts: 54
Location: US

Great...looks like the VALUES clause did it. Still get a warning label in the toolkit for that statement, but everything deploys and works as expected. And this is still before the CSD01 update for the toolkit.

Thanks a bunch for everyone's help.

MG
Back to top
View user's profile Send private message
trongbx
PostPosted: Mon Jun 15, 2009 1:01 am    Post subject: how to access to multi database from the same compute node Reply with quote

Novice

Joined: 23 Nov 2008
Posts: 21

mgk wrote:
Hi,

If you look in the docs at each of the database access functions / statements (INSERT, UPDATE, DELETE, SELECT, PASSTHRU, CALL) you will see that they have all been updated to allow a DSN (and schema) clause. This allows you to choose a DSN at runtime (maybe based on an incoming message) for each database operation, and even a different DSN each time the same operation is executed if necessary.

The main restriction with this capability is that each DSN accessed in the same node, must be of the same type (ORACLE, DB2 etc).


Regards,


Could you please give me the detail information or an example to do that? I'm working on the project that access to three databases from the same compute node.

Thank you very much.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MB v6 - How to access multiple Databases
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.