File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Update the Inserted record while Autocommit is false Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Update the Inserted record while Autocommit is false" Watch "Update the Inserted record while Autocommit is false" New topic
Author

Update the Inserted record while Autocommit is false

Azrael Noor
Ranch Hand

Joined: Jul 29, 2010
Posts: 382
First
Autocommit is FLASE

then Insert a record

then update same record in same session and same user id

commit it

Insertion is done succesfully but Updation on same record is not done

Same query is working when i later done updation

Why so?





Regards
Azrael Noor
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

it sounds like a bug in your code, can you produce a small working sample that displays this.
all it would do is exactly as you have described in your description. The bit about it working later does not need to be shown, as we don't need to see the working code.
Azrael Noor
Ranch Hand

Joined: Jul 29, 2010
Posts: 382
Sir i have marked the status as solved
the database was new to me and their was some trigger which was not letting me doing this and i was not aware of this.

Thank you

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

thank you for letting us know.
 
Consider Paul's rocket mass heater.
 
subject: Update the Inserted record while Autocommit is false