Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use BEGIN TRANSACTION with Sql Passthrough
Message
From
16/09/2004 02:13:10
Suhas Hegde
Dental Surgeon
Sirsi, India
 
 
To
16/09/2004 01:45:10
Raoshan Kumar
Softinfo Systems Pvt. Ltd.
New Delhi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00942755
Message ID:
00942759
Views:
25
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform