Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to commit all RVs & SPTs by one ConnectionHandle num
Message
From
07/12/2006 06:36:10
 
 
To
07/12/2006 06:04:49
Aye Mya Thida Kyaw
Ingenuity Microsystems Sdn Bhd.
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01175529
Message ID:
01175534
Views:
8
Hi,

if you wanna mix SPT and Remote View updates in one transaction,
you can use this
USE your_remote_view IN 0 CONNSTRING poSqlConn
REPLACE someField IN your_remoteview
IF SQLEXEC(poSqlConn,'UPDATE someTable SET ....') = 1 AND ;
   TABLEUPDATE(.T.,.F.,'your_remote_view')
   SQLCOMMIT(poSqlConn)
ELSE
   SQLROLLBACK(poSqlConn)  
ENDIF
The connection must be created with the shareable flag set in SQLCONNECT()/SQLSTRINGCONNECT() function.

Regards
Christian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform