Simple dirty way would be to use the string substitution for the table name ($tableName$). If it is anything more the one query that might need this I would think about using multiple contexts.

On Dec 22, 2005, at 7:27 AM, Ashish Kulkarni wrote:

Hi
I have a situation, in which i have 2 database on
suppose DB2, first database is Test1, and second is
Test2.

There is table called names in both databases.

I have created JNDI connection in tomcat.

Now in my website i want to give user a option to
select one of the 2 JNDI connection, and then i must
be able to run query against that database.

For example , if the user selects JNDI ( i will show
some meaningful name) for Test1 then get the data from
names in database Test1.

What is the best way of doing this, if i am using
ibatis SQL Map and DAO

Ashish

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to