Cathi,
Yes I am.
Doug,
Are you using the CommandBuilder to generate the Update and Insert statements?
>I am trying to get nested transactions to work using 2 sql command objects
>
>SqlTransaction myTrans = SqlConn.BeginTransaction();
>
>HeaderCmd = poh.InsertCommand;
>HeaderCmd.Transaction = myTrans;
>
>if(poh.UpdateInsertdata(HeaderCmd, Header))
>{
> DetailsCmd = pod.InsertCommand;
> DetailsCmd.Transaction = myTrans;
>
> if(pod.UpdateInsertData(DetailsCmd, Details))
> GoodTrans= true;
>}
>if(GoodTrans)
> myTrans,Commit();
>else
> myTrans.Rollback();
>
>
>Both of these command share the same transaction.
>
>I am forcing an error to occur during the detail portion of the code. But when I hit
>myTrans.Rollback() I am greeted with:
>
>The ROLLBACK TRANSACTIOn request has no corresponding BEGIN TRANSACTION.
>
>Anyone have a clue?
>
>Doug
-----------------------------------------
Cathi Gero, CPA
Consultant and Development Director
Prenia Software & Consulting Services
Microsoft MVP
cgero@prenia.com
www.prenia.comwww.foxcentral.net