أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
If i have two separate databases, and i am inserting in both databses and calling commit on both connections. if due to some problem lets say some network problem, second commit failed. how do we handle this? as the data is inserted in database1 but not in database2?
Hi John,
thanks for you answer. But my situation is
Begintransaction1();
Begintransaction2();
Insert1();
Insert2();
commit1();
commit2();
if an exception occurs at commit2. then how shall we handle it? because the data in database1 got committed and cannot be rollbacked.and no data got inserted in database2, making the databases inconsistent
If inserting into both the databases are EQUALLY important, why dont you do commit after second insert.