thanks for answers,
@Roger Chung-Wee :
you mean when ever i commit an sql query i have to put it in a try catch block or only one try catch block at the end of the querries?
i mean;
try{
conn.setAutoCommit(false); // start of JDBC transaction
delete from x table
conn.commit(); // end of JDBC transaction
}catch(Exception e){
conn.rollback();
}
.
.
.//another commit
try{
conn.setAutoCommit(false); // start of JDBC transaction
update x table
conn.commit(); // end of JDBC transaction
}catch(Exception e){
conn.rollback();
}
.
.
.
or I must do roll back only once at the end of the page in catch of a try catch ?
@Srilakshmi Vara :
Your question is not clear,
sorry.
I am a beginner
Batch?umm i think bacth works like this;
it adds all querries in an order in the statement and sends to database in one when executeBatch() method is invoked..
so i wonder how can i rollback if a problem occured in an sql query which is in the middle of the bacth?
thx for the answers again...
@Roger Chung-Wee :I have heard of it several times ,atomic.
I wonder how can i make my queries atomic or what atomic means in fact?
can you advice me an ebook?or can i demand from you if you have a document.
and if you dont mind
[ July 01, 2005: Message edited by: rasit fidanov ]