> SQLSetprop(nHandle, 'Transactions', 2) > lRet = .T. > For i = 1 To nTables > cAlias = oxml.Tables[i].Alias > If lRet > if not Tableupdate(lnRows, llForce,cAlias,'aRowResults') > lRet = .F. > Endif > Endif > Endfor > > If lRet > Sqlcommit(nHandle) > Else > Sqlrollback(nHandle) > Endif > > SQLSetprop(nHandle,"Transactions",1) >>
CA.UseTransactions = .F. && with this the CA don't add transaction commands
on VFP9 don't forget to set:SQLSetprop(nHandle,"DisconnectRollback",.T.) && send a IF TRANLEVEL()>0 ROLLBACKOn VFP8 you have to use a implicit transaction and force SQL to ignore the CA commands
* WITH SQLSetprop(m.nHandle,"Transactions",1) IF SQLEXEC(m.nHandle,"BEGIN TRAN") && this increment the transaction semaphore ..... =SQLEXEC(m.nHandle,"IF TRANLEVEL()>0 "+IIF(m.lRet,"COMMIT","ROLLBACK")Fabio