Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with prepareStatement.executeUpdate()

1590864Apr 3 2016 — edited Apr 3 2016

Dear All,

I am using a Java code to update a record in table but when my program reaches at prepareStatement.executeUpdate(); it just hangs for almost two min and then it inserts the data to table. Can anyone help me why this is happening. Even my table only have 10 to 20 records.

updateQuery = "update XXMPC.XXMDN_B2B_LMS_TRANSFER set PAYMENT_DISBURSEMENT_STTS_CODE=?,PAYMENT_DISBURSEMENT_STTS_DESC=? where TRXN_REFERENCE_NUMBER=?";

                         conn.setAutoCommit(true);

                         prepareStatement = conn.prepareStatement(updateQuery);

                        

                         prepareStatement.setString(1, StatusCode);

                         prepareStatement.setString(2, StatusDetail);

                        

                         prepareStatement.setInt(3, Integer.parseInt(SequenceNum));

                        

                         prepareStatement.executeUpdate();

                        

                         conn.close();

                         conn = null;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2016
Added on Apr 3 2016
1 comment
586 views