MarkButler
Programmer
I have a remote view using MS SQL 2000 database and table. I use a framework and had a problem I was trying to solve regarding updates that did not back out correctly when an error was encountered. I wrote the following small program to test the transaction and subsequent backout when a failure occurs.
===========
CLOSE ALL
CLEAR ALL
CLEAR
SET MULTILOCKS ON
OPEN DATABASE v:\cms\data\cms_r.DBC
SELECT 0
USE cms_r!fieldops_m NODATA && remote SQL 2000 view
CURSORSETPROP('BUFFERING',5)
* set some parameters for the above view
pkvalue='%'
findfo_team='%'
findfo_name='DA%'
=REQUERY()
BEGIN TRANSACTION
REPLACE ALL fo_mi WITH '8' FOR fo_mi=' '
=TABLEUPDATE(.T.,.T.)
ROLLBACK
=REQUERY()
BROWSE
===========
My problem is that when I issue the rollback I would have expected the subsequent browse to show unchanged records. Instead the records are indeed changed and using SQL enterprise manager confirms this. What am I missing?
VFP 7 SP1
TIA
Mark
===========
CLOSE ALL
CLEAR ALL
CLEAR
SET MULTILOCKS ON
OPEN DATABASE v:\cms\data\cms_r.DBC
SELECT 0
USE cms_r!fieldops_m NODATA && remote SQL 2000 view
CURSORSETPROP('BUFFERING',5)
* set some parameters for the above view
pkvalue='%'
findfo_team='%'
findfo_name='DA%'
=REQUERY()
BEGIN TRANSACTION
REPLACE ALL fo_mi WITH '8' FOR fo_mi=' '
=TABLEUPDATE(.T.,.T.)
ROLLBACK
=REQUERY()
BROWSE
===========
My problem is that when I issue the rollback I would have expected the subsequent browse to show unchanged records. Instead the records are indeed changed and using SQL enterprise manager confirms this. What am I missing?
VFP 7 SP1
TIA
Mark