Home > Archive > microsoft.public.cert.mcdba > August 2003 > What is wrong with this SQL statement (Transaction)?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What is wrong with this SQL statement (Transaction)?
TomTom

2003-08-19, 1:24 am

I'm wondering what is wrong with the statements below. I'm sure I'm missing
something...

begin tran myTransaction

--my SQL works here.

rollback tran myTransaction

---------
Error

Server: Msg 6401, Level 16, State 1, Line 5
Cannot roll back myTransaction. No transaction or savepoint of that name was
found.

--------

Thanks!
Tomtom


Ray Higdon

2003-08-19, 8:24 am

Are you issuing an actual transaction? If you are doing a select it is not
an actual transaction. For example, this works.

begin tran mytran
create table blah (ikey int)
rollback tran mytran

if you try to insert or select from the table named blah, it will not exist.

HTH

--
Ray Higdon MCSE, MCDBA, CCNA
--
"TomTom" <tomtom@XunmonitoredX.com> wrote in message
news:OZFFFmgZDHA.2572@TK2MSFTNGP09.phx.gbl...
> I'm wondering what is wrong with the statements below. I'm sure I'm

missing
> something...
>
> begin tran myTransaction
>
> --my SQL works here.
>
> rollback tran myTransaction
>
> ---------
> Error
>
> Server: Msg 6401, Level 16, State 1, Line 5
> Cannot roll back myTransaction. No transaction or savepoint of that name

was
> found.
>
> --------
>
> Thanks!
> Tomtom
>
>



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net