General information
Title:
Wrapping VFP Remote Views within SQL Transactions
Here's a serious flaw which Microsoft say they have been looking into for a long time now - and appear to have given up.
1. Create 2 remote views: rvA and rvB directed at 2 SQL tables in a form dataenvironment. Use a vfp connection as opposed to an ODBC DSN and you will be able to share the connection.
2. Make data modifications to both remote views
3. Now try to make a SQL Transaction of the modifications to the two views as follows:
lnHandle = CursorGetProp('ConnectHandle', 'rvA')
SQLEXEC(lnHandle,'BEGIN TRANSACTION')
TABLEUPDATE(1,.F.,'rvA')
TABLEUPDATE(1,.F.,'rvB')
* now try either rolling back or committing the data
SQLEXEC(lnHandle,'IF @@TRANCOUNT > 0 ROLLBACK')
* or
SQLEXEC(lnHandle,'IF @@TRANCOUNT > 0 COMMIT')
4. Now next time you try to REQUERY either view, the connection is confused and tries to REQUERY the wrong view.
The REQUERIES are an integral part of my system design and I am faced with the prospect of having to abandon SQL transaction processing because VFP can't support it through remote views.
A rather serious yet poorly publicised bug wouldn't you say Microsoft?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only