2013年11月19日星期二

java Connection 's commit () problem

I use the same Connection object to each of the A, B two insert data into tables . I used when inserting Table A bulk insert is off autocommit back then call conn.commit (); But this then inserting data to B can not be inserted , nor error. If the insert does not turn off automatically when the table A submission , then insert Table B no problem .
What is the commit () itself is the problem? Or insert Table B Table A bulk insert when not finished ? Thank
------ Solution --------------------------------------- -----
you have conn.commit (), B will not get it.
------ Solution ---------------------------------------- ----
in a transaction where , then it is only closed. Then on again.
------ Solution ---------------------------------------- ----
commit after this thing is over, of course, do not put in storage after inserting a
------ Solution ----------------- ---------------------------
you can set a savepoint instead of
------ For reference only - -------------------------------------
that commit () then you must close ( ) , then reacquires connected ?
------ For reference only -------------------------------------- -
+1024
------ For reference only -------------------------------- -------
agree

没有评论:

发表评论