Subject Re: [Firebird-Java] Firebird database switch in same connection
Author Roman Rokytskyy
Hi,

> I have got a DB connection to the Firebird server (super sever) ,
> to the database say 'c:\temp\one.fdb'. Now I like to switch the
> database to 'c:\temp\two.fdb' in the same connection ..

This is not possible. Connection is obtained to the database, not to the
server. Transactions are database-bound, not server-bound.

> I tried like as in the below code snippet ,

> Connection conn = fb.getConnection("c:\temp\one.fdb");
> //do some operation
> //commit
> //then swith db
> conn.setCatalog("c:/temp/two.fdb");
> // I am not sure of catalog setting will work

> but db switching like above failed

Catalogs are not supported by Firebird (see DatabaseMetaData results).

> So kindly let me know anyway to satisfy my requirement.

Please describe your requirement in details. Why do you need to switch the
database in the same connection? Why wouldn't be enough to use another
connection?

Roman