[Logo]
Forums Register Login
one statement for two databses?
can we use one statement for two databse connections?
Hi,
unfortinatly I don't think you can use statements for two connections, because you use connection.createStatement() to generate a statement.
Hope this answers your question.
Uwe
what happens if we close one connection and open another connction on the same statement?
Santoshkumar,
When you say the same statement, do you mean the same object or the same reference? The same object can't get a different connection because the connection is tied to the object (as pointed out above.) The same reference can, but then it is a new statement object.
It might help if you described why you are trying to do this. It may be that you are looking for XA compliant Drivers and 2 phase commits...
Dave
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 12, 2017 11:47:13.