Forums Register Login

A question regarding Connection object

+Pie Number of slices to send: Send
What will happen to the connection object if an exception occurs while excecuting a prepared statement.For example,


what will happen to the connection object if an exception is thrown while executing the query?
Thanks in advance
+Pie Number of slices to send: Send
In general, the Connection object would remain able to perform further operations. That certainly ought to be the case if the exception was due to bad SQL syntax, missing data etc. If, on the other hand, the exception was due to a lost physical link to the database, the Connection would be broken.
+Pie Number of slices to send: Send
There are a number of rows that are inserted iteratively and for each row, a Statement is prepared from connection.After insertion of a certain number of records, I get a stament has been already closed exception.
What could be the reason for this?
Alas, poor Yorick, he knew this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1095 times.
Similar Threads
what will happen when following case raised while creating connection object
how to close connection object in finally block when an exception is raised in try bl
Doubt in closing connection, resultset, statemnet object???
Connection is busy with results for another hstmt
JDBC and MS SQL - object doesn't exist
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:33:14.