Are there framework methods for using savepoints, or do you have to execute a 
SQL statement to use them?

I just learned that savepoints aren't SQL-Server-only (I had thought that they 
were) -- they seem to be available in Oracle (at least since 10.2).  They 
aren't part of "standard SQL", are they?

At 07:20 AM 1/5/2006, Ted Neward wrote
>Savepoints are often used to provide the same basic kind of behavior that
>nested transactions are asked to provide, a la your example scenario. I'd go
>with the savepoint:
>
>Start trans
>Begin loop
>        Do work
>        Create savepoint
>End loop
>Commit trans or rollback
>
>Note that you can also rollback to a savepoint if necessary/desired. Check
>the SQL Server docs for how many open savepoints you can have.
>
>Bear in mind, too, that you're holding locks throughout the window of the
>transaction, so savepoints don't release any contention issues here.
>
>Ted Neward
>Author, Presenter, Consultant
>Java, .NET, XML services
>http://blogs.tedneward.com


J. Merrill / Analytical Software Corp

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to