Forums Register Login

JDBC connection

+Pie Number of slices to send: Send
I am using JDBC connection to get the resultset. I am using same JDBC connection to update some records of same table. It is working. My question is:
Should I lock the connection when I do update or resultset.next()
If not, will resultset.next() give me correct data or there can be potential problem
+Pie Number of slices to send: Send
Hi,
You can use ResultSet.TYPE_SCROLL_SENSITIVE result sets to fetch data. But once it reads from the database, it can't see the changes made from other transactions.
So you can call the refreshRow() to get the latest data from the database.
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1014 times.
Similar Threads
Help - Data visibility in Weblogic and JDBC connection problem
JDBC connection query
JDBC connection query
Problem in accessing package variable through trigger
Hibernate and Jdbc
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:46:03.