H
Hush
Hi
I would like to handle transaction in MsSql 2005 and Oracle both in the same
time, and i want to provide safe way in case when something goes wrong.
Databases installed on two different host, client have remote communication
with db.
Let's say i want insert simple record to table in MsSql, and then i want to
do similiar operation in Oracle, now if any of this operation failed then in
my case i don't want to insert this transaction.
I read a little bit about TransactionScope, i guess that this is the answer
for that problem.
using (TransactionScope ts = new TransactionScope())
{
try
{
//connect to mysql and try to insert record
//connect to oracle and try to insert record
ts.Complete();
} catch (...) {...}
}
My question is what happen when for example insert records was fine and
before calling method ts.Complete() something wrong happen with one of server
where database is running (shutdown, lack of power, etc) ?
Greets
Hush
I would like to handle transaction in MsSql 2005 and Oracle both in the same
time, and i want to provide safe way in case when something goes wrong.
Databases installed on two different host, client have remote communication
with db.
Let's say i want insert simple record to table in MsSql, and then i want to
do similiar operation in Oracle, now if any of this operation failed then in
my case i don't want to insert this transaction.
I read a little bit about TransactionScope, i guess that this is the answer
for that problem.
using (TransactionScope ts = new TransactionScope())
{
try
{
//connect to mysql and try to insert record
//connect to oracle and try to insert record
ts.Complete();
} catch (...) {...}
}
My question is what happen when for example insert records was fine and
before calling method ts.Complete() something wrong happen with one of server
where database is running (shutdown, lack of power, etc) ?
Greets
Hush