Forums Register Login
one statement for two databses?
can we use one statement for two databse connections?
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.
what happens if we close one connection and open another connction on the same statement?
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...

This thread has been viewed 526 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 14, 2018 10:36:35.