In the above Code, Consider con is an active Connection and the code is wrapped with proper Exception Handling.. I want to know whether the records will be commited or not...
Certified on SCJP 5.0, OCPJWCD, Spring3.2, OCEJWSD, CKAD
As You said it was not working.. The Records have been inserted after executing the code.... I am Using Oracle thin driver....I think whenever we don't give commit or rollback and closing the connection smoothly, the cached transactions are getting commited even though we set AutoCommit as false...
</pre>
with thanks,
Sathish Kumar.G
Certified on SCJP 5.0, OCPJWCD, Spring3.2, OCEJWSD, CKAD
If your insert statements are successful, and you can query the database for these two records after your program has completed then one of two things could be true:
I tried the following three code sections. In the first one when I used conn.commit(), the changes got committed. I verified that by firing the select query in database from pl/sql developer. In case of second and third code sections changes were not persistent and were not committed.
First -
Second
Third
Regards
Salil Verma
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
Gift giving made easy with the permaculture playing cards