|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Exception on SqlTransaction.Rollback(), BUT it doesn'tHi,
My program injects message at the same time as SQLServer is backing up (full). I write injecting module using Try...Catch block with SqlTransaction and using SP. Within Exception block I call Rollback() (it cautch timeout exception). I've found that it got exception on Rollback() command with InvalidOperationException (message="This SqlTransaction has completed; it is no longer usable."). In this situation, sometime the message is right (inject success), but sometime it doesn't. How can I resolve this problem? Thanks in advance, Thana N. Replicate the SQL Server, do backups from the Replicated server.
- Sahil Malik [MVP] Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync ---------------------------------------------------------------------------- Show quoteHide quote "Thana N." <Tha***@discussions.microsoft.com> wrote in message news:228F63E4-EF26-4761-95FF-052CF8C12008@microsoft.com... > Hi, > > My program injects message at the same time as SQLServer is backing up > (full). > I write injecting module using Try...Catch block with SqlTransaction and > using SP. > Within Exception block I call Rollback() (it cautch timeout exception). > I've > found that > it got exception on Rollback() command with InvalidOperationException > (message="This SqlTransaction has completed; it is no longer usable."). In > this > situation, sometime the message is right (inject success), but sometime it > doesn't. > How can I resolve this problem? > > Thanks in advance, > Thana N. > I cannot do that because SQLServer is out of my control.
Thanks for your reply. Show quoteHide quote "Sahil Malik [MVP]" wrote: > Replicate the SQL Server, do backups from the Replicated server. > > - Sahil Malik [MVP] > Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync > ---------------------------------------------------------------------------- > > "Thana N." <Tha***@discussions.microsoft.com> wrote in message > news:228F63E4-EF26-4761-95FF-052CF8C12008@microsoft.com... > > Hi, > > > > My program injects message at the same time as SQLServer is backing up > > (full). > > I write injecting module using Try...Catch block with SqlTransaction and > > using SP. > > Within Exception block I call Rollback() (it cautch timeout exception). > > I've > > found that > > it got exception on Rollback() command with InvalidOperationException > > (message="This SqlTransaction has completed; it is no longer usable."). In > > this > > situation, sometime the message is right (inject success), but sometime it > > doesn't. > > How can I resolve this problem? > > > > Thanks in advance, > > Thana N. > > > > >
Other interesting topics
DataTable.Select method bug in .Net Framework 1.1 SP1
Is this a good application Design? CancelCurrentEdit doesn't OleDb: Get Properties ado.net unable to connect from Windows 2000 after SQL server Resta Oracle and .NET stored procedures returning dataset... minumn and maximum Datasets and identities in ADO.NET 2.0 view vs sproc Cloning Datasets but also filtering |
|||||||||||||||||||||||