Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transactions on SQL Server
Message
De
21/12/2001 07:51:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00597109
Message ID:
00597213
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform