Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use BEGIN TRANSACTION with Sql Passthrough
Message
De
16/09/2004 02:13:10
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
À
16/09/2004 01:45:10
Raoshan Kumar
Softinfo Systems Pvt. Ltd.
New Delhi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00942755
Message ID:
00942759
Vues:
26
>Hi all
>
>Can you suggest me how to issue the "BEGIN TRANSACTION" and "END TRANSACTION" using VFP 7.0 SQL Passthrough functions. How do I ensure that the transactions are safe and secure
>
>Thanks
>
>Raoshan

hi Raoshan,

Something like

sqlexec(han,"begin transaction")
sqlexec(han,"select * from .....","mycursor")
Select Mycursor
browse && make changes
* make the cursor updatable
if Tableupdate(2,.t.,"mycursor")
sqlexec(han,"IF trancount > 0 Commit")
else
*trap error
sqlexec(han,"IF trancount > 0 Rollback")
tablerevert("mycursor")
endif


HTHs
suhashegde
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform