This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes JDBC connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JDBC connection" Watch "JDBC connection" New topic

JDBC connection

Prabhleen Kaur

Joined: May 31, 2002
Posts: 3
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
If not, will give me correct data or there can be potential problem
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
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.

Consider Paul's rocket mass heater.
subject: JDBC connection
Similar Threads
Help - Data visibility in Weblogic and JDBC connection problem
JDBC connection query
Problem in accessing package variable through trigger
JDBC connection query
Hibernate and Jdbc