dcsimg
Problem with RollBack().
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kevin_Tan
Posted On:   Monday, May 21, 2001 08:48 PM

Database database1 = new Database(); QueryDataSet queryDataSet1 = new ... QueryDataSet queryDataSet2 = new ... try{ database1.saveChanges(queryDataSet1); database1.saveChanges(queryDataSet2); database1.commit(); }catch(Exception exx){ database1.rollback(); } If an error occurr during the line for queryDataSet2, < < database1.saveChanges(queryDataSet2),>   More>>

Database database1 = new Database();

QueryDataSet queryDataSet1 = new ... QueryDataSet queryDataSet2 = new ...




try{

database1.saveChanges(queryDataSet1);

database1.saveChanges(queryDataSet2);

database1.commit();

}catch(Exception exx){

database1.rollback();

}

If an error occurr during the line for
queryDataSet2, < <
database1.saveChanges(queryDataSet2),>>

the queryDataSet1 will still be saved and wont be rollback.


PLEASE HELP    <<Less
About | Sitemap | Contact