Home All Groups Group Topic Archive Search About

Exception on SqlTransaction.Rollback(), BUT it doesn't

Author
22 Jun 2005 10:41 AM
Thana N.
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.
Author
22 Jun 2005 10:45 AM
Sahil Malik [MVP]
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.
>
Are all your drivers up to date? click for free checkup

Author
23 Jun 2005 2:53 AM
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.
> >
>
>
>

Bookmark and Share