problem in transaction .
-
in my situation in one click event i have to insert data into a sql table as well as oracle table.Now i want to use transactions but the problem is either i have to use oracle transaction which does not support oracle command or sql transaction which does not support sql command.What i have to do in this situation.I want to do that if one of the two query fails to execute other one must be roll back. Thanx in advance
-
in my situation in one click event i have to insert data into a sql table as well as oracle table.Now i want to use transactions but the problem is either i have to use oracle transaction which does not support oracle command or sql transaction which does not support sql command.What i have to do in this situation.I want to do that if one of the two query fails to execute other one must be roll back. Thanx in advance
I've never had to deal with transactions across two different providers (oracle and sql server) before but here's something off the cuff. How about adding some kind of 'Pending' state to the inserts 1. Perform first insert (pending) 2. Perform second insert (pending) 3. Validate both have inserted 4. Update first (live) 5. Update second (live) I know there's still a window for something to fail between operations 4 and 5 but it's much less likely than a failure between 1 and 2 (due to constraints you might have on various fields). A Transaction would be better but this is an option.
Mark Graham (MCP) // The Doodler blogging at: dotnet notepad