Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transactions with VFP ODBC
Message
De
25/06/1999 13:30:10
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
 
 
À
25/06/1999 11:05:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00233939
Message ID:
00234035
Vues:
31
A little ugly, but you might get away with writing a stored procedure that takes a parameter with is the SQL to execute, and putting the transaction commands around it:

LPARAMETERS cSQLEXEC
BEGIN TRANSACTION
&cSQLEXEC
ENDTRANSACTION

and executing the stored procedure instead of the SQL directly. I haven't tried this personally so it might not work but it seems logical to me.

If you try this please let me know if it works correctly.

>>We've got a C/S app that can use various back ends, depending on the client's environment. Among the back ends supported is VFP. In this configuration we use the VFP ODBC driver to connect to the VFP DBC at the back end from our VFP app on the front end.
>>
>>This has worked fine, but now we're adding transaction processing with a new module. After establishing a connection handle with SQLCONNECT(), sending the SQLEXEC(nhandle,"BEGIN TRANSACTION") command always returns -1. The same code works for SQL Server and Oracle via ODBC, but not for VFP.
>>
>>Can anyone shed light on what's happening here?
>
>Hi Alan!
>
>How's things going??
>
>I believe that transactions are not supported through VPF ODBC. It works in Oracle and SQL Server because the database natively supports transactions. This isn't the case with VFP.
Eric Shaneson
Cutting Edge Consulting
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform