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 » Dynamic Datasource name

Post new topic  Reply to topic
 Dynamic Datasource name « View previous topic :: View next topic » 
Author Message
jagan
PostPosted: Fri Apr 06, 2007 9:38 pm    Post subject: Dynamic Datasource name Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 55

In my message flow i am using database insert statement as follow..

SELECT COUNT(*) FROM Database.DBDNS.DBSCHEMA.EMPLOYEE AS X WHERE(X.A= X.B);
when I use the above statement every thing is is working fine. Iam trying to get te DBDNS and DBSCHEMA from property file to retrive dynamically. But getting error to connect database.. Pl find the below ESQL statements which is not working correctly.

Declare dbDNS_values char;
declare DBSchema_value char;
SET dbDNS_values =get this values from prop file(DBDNS)
SET DBSchema_value= get this values from prop file(DBSCHEMA)

SELECT COUNT(*) FROM Database.{dbDNS_values}.{DBSchema_value}.EMPLOYEE AS X WHERE(X.A= X.B);

But getting database exception as below..
[IBM][CLI Driver][DB2/SUN64] SQL0204N "DBDNS.DBSCHEMA.EPC" is an undefined name. SQLSTATE=42704
please let me know how to use the ESQL statement to get the values dynamcially and which will be the same as the first sql statement
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Fri Apr 06, 2007 10:29 pm    Post subject: Re: Dynamic Datasource name Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi jagan,
jagan wrote:
SET dbDNS_values =get this values from prop file(DBDNS)
SET DBSchema_value= get this values from prop file(DBSCHEMA)
How are you reading a property file in ESQL ?

Regards.
Back to top
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Sat Apr 07, 2007 1:09 am    Post subject: Re: Dynamic Datasource name Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

elvis_gn wrote:
Hi jagan,
How are you reading a property file in ESQL ?

Regards.


I think it is hidden funcionality

Sorry...
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Sat Apr 07, 2007 1:19 am    Post subject: Re: Dynamic Datasource name Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jagan wrote:
In my message flow i am using database insert statement as follow..

SELECT COUNT(*) FROM Database.DBDNS.DBSCHEMA.EMPLOYEE AS X WHERE(X.A= X.B);
when I use the above statement every thing is is working fine. Iam trying to get te DBDNS and DBSCHEMA from property file to retrive dynamically. But getting error to connect database.. Pl find the below ESQL statements which is not working correctly.

Declare dbDNS_values char;
declare DBSchema_value char;
SET dbDNS_values =get this values from prop file(DBDNS)
SET DBSchema_value= get this values from prop file(DBSCHEMA)

SELECT COUNT(*) FROM Database.{dbDNS_values}.{DBSchema_value}.EMPLOYEE AS X WHERE(X.A= X.B);

But getting database exception as below..
[IBM][CLI Driver][DB2/SUN64] SQL0204N "DBDNS.DBSCHEMA.EPC" is an undefined name. SQLSTATE=42704
please let me know how to use the ESQL statement to get the values dynamcially and which will be the same as the first sql statement



What is EPC here ?

Is is table name ?

I can not see it in your select ?

Is it part of DBSchema_value ( red from property file ) ?

Check it.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
jagan
PostPosted: Mon Apr 09, 2007 12:22 pm    Post subject: Dynamic Datasource name Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 55

Hi All,

the below code is working fine.. with the values..

SELECT COUNT(*) FROM Database.{dbDNS_values}.{DBSchema_value}.EMPLOYEE AS X WHERE(X.A= X.B);

Where dbDNS_values & DBSchema_value are getting from Property files using and Java and storing those values as SHARED Variables..

Jagan
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 » Dynamic Datasource name
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.