| Author |
Update statement hangs
|
Stefanie Rueller
Greenhorn
Joined: Aug 25, 2005
Posts: 3
|
|
Hi, I am trying to do an update to an Oracle 9i table. Code looks like: Statement stmtUpdate = conn_data.createStatement(); try { int UpdateResult = stmtUpdate.executeUpdate(sqlUpdateProduct); if ( UpdateResult == 1) { When I execute the update it hangs. I can at a DB level that it is done processing but seems to hang upon finishing. I made sure AutoCommit is on. When I try the exact same query from an SQL prompt, there is no problem. Please help. Stefanie
|
 |
Dave Salter
Ranch Hand
Joined: Jul 20, 2005
Posts: 292
|
|
|
What is the SQL it is issuing?
|
 |
Stefanie Rueller
Greenhorn
Joined: Aug 25, 2005
Posts: 3
|
|
|
just a regular update to one tabel. I ran the update seperately and it works fine. Does not take much time at all.
|
 |
Jayesh Lalwani
Ranch Hand
Joined: Nov 05, 2004
Posts: 502
|
|
|
Do you have other connections open? Possibly, there is a deadlock in the database
|
 |
Stefanie Rueller
Greenhorn
Joined: Aug 25, 2005
Posts: 3
|
|
No, that's the only query accessing the instance.
|
 |
Roger Chung-Wee
Ranch Hand
Joined: Sep 29, 2002
Posts: 1683
|
|
|
Is conn_data a local variable? If not, make it so and rerun.
|
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
|
 |
Padma Lalwani
Ranch Hand
Joined: Nov 02, 2004
Posts: 49
|
|
You might want to try with setAutoCommit(false) and then issuing an explicit commit yourself I once had a problem with setAutoCommit set to true (which it is by default), and then found that causes errors in Windows 2000 OS. Cannot remember or locate exact reason, but the change to auto commit fixed it Padma
|
 |
 |
|
|
subject: Update statement hangs
|
|
|