Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions on SQL Server
Message
From
21/12/2001 07:51:17
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00597109
Message ID:
00597213
Views:
12
Hi Rodolfo

>
>Which is the best way to use Transactions in MS-SqlServer?
>

I assume that you are setting the Transactions property of your connection to "Manual" in any case - otherwise the discussion is moot because SQL Server will treat each update command as a single transaction.

Once you have set transactions to manual it doesn't really make any difference whther you use Option A or B unless you are also setting SQL Server's "Implicit Transactions" property yourself too, which means executing:

SQLEXEC( lnConHandle, “SET IMPLICIT_TRANSACTIONS OFF” )

because without that command, SQL Server will autoimatically start a transaction on receipt of any update (Insert, Update or Delete) statement unless one is already open, in which case it just adds to the current transaction.

I think most DBAs would frown on you turning off implicit transactions on the server, so at the end of the day it really comes down to personal style.
----
Regards
Andy Kramek
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform