Hi Bernard,
Sorry bout the sample code my mistake. I used only one connection. Here is the original code
begin transaction
SQLExec( nConn, 'BEGIN TRANSACTION' )
* Update changes to biophysicalrv remote view.
lEverythingOK = tableupdate( 2, .F., 'biophysicalrv' )
if lEverythingOK
* Update changes to itemsrv.
lEverythingOK = tableupdate( 2,.F.,'itemsrv')
endif
lEverythingOK = .F. && I placed this code to tell the program that it needs to roll back the transactions.
* End the transaction on the server and VFP.
If lEverythingOK
SQLExec( nConn, 'IF @@TRANCOUNT > 0 COMMIT' )
end transaction
else
SQLExec( nConn, 'IF @@TRANCOUNT > 0 ROLLBACK' )
rollback
Endif
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.