Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Again, troubles with CursorAdapter
Message
De
16/08/2003 08:15:32
 
 
À
15/08/2003 13:37:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00819734
Message ID:
00820734
Vues:
29
Hi Aleksey

>What you are missing is the fact that after you execute SQLSETPROP(con,"Transactions",2), the server will automatically switch to implicit transaction as soon as you try to execute any command that is supposed to be tracked by a transaction.

Sorry, again, but I am not missing anything. What you say is true, but only for SQL Server. As I tried to p[oint out it is not true for servers that do not support Implicit Transactions in the way that SQL Server does.

The statement that you made that

SQLSETPROP( [con], 'Transactions', 2) is equivalent to 'BEGIN TRANSACTION'

is simply wrong, because, as you point out, even forcing implicit mode does not actually start a transaction. If you do the following you will NOT have a transaction on the back end, even in SQL Server.
SQLSETPROP( [con], 'Transactions', 2)
SQLEXEC( [con], "SET implicit_transactions OFF" )
SQLEXEC( [con], "INSERT INTO [table]....." )
However, the following WILL give you a transaction even in SQL Server
SQLSETPROP( [con], 'Transactions', 2)
SQLEXEC( [con], "SET implicit_transactions OFF" )
SQLEXEC( [con], "BEGIN TRANSACTION" )
SQLEXEC( [con], "INSERT INTO [table]....." )
I do understand what you mean, I am merely trying to the qualify the blanket statement that you made (i.e. nit-picking :)
----
Regards
Andy Kramek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform