FUNCTION APND(lAdd)
*************
LOCAL cAlias := Alias()
DEFAULT Toevoegen := .F.
DO WHILE .T.
//APPEND BLANK
(cAlias)->(DBAPPEND(! lAdd))
IF ! (cAlias)->(NETERR())
RETU .T.
ELSE
IF msgNoYes("Not appended. Try again (5 sec) ?")
MtrWait("Wait 5 sec","Append again")
ELSE
RETU .F.
END
END
END
RETU .T.
********************************************
proc mtrWait(cMessage,cTitle,nSec)
***************************************
// Wait with oMeter
MsgMeter( { | oMeter, oText, oDlg, lEnd | ;
TestMMt( oMeter, oText, oDlg, @lEnd , nSec ) },;
cMessage , cTitle )
RETURN
function TestMMT( oMeter, oText, oDlg, lEnd , nSec )
*****************************************************
LOCAL start := seconds()
DEFAULT nSec := 5
oMeter:nTotal = nSec //seconds()
DO WHIL seconds() < start + nSec
EVAL({||oMeter:Set(seconds()-start ) , SysRefresh(), ! lEnd })
END
return nil
Otto wrote:But what it a record fails? How could a “Rollback” be made.
DBAPPEND() Append a new record to the current Lock List
DBRLOCK() Lock the record at the current or specified identity
DBRLOCKLIST() Return an array of the current Lock List
DBRUNLOCK Release all or specified record locks
Otto wrote:Does someone use the Transaction Processing System (TPS) from
Advantage database server?
Regards,
Otto
A Transaction Processing System (TPS) allow an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, a TPS processes multiple insertions, updates, and deletions as though they were a single operation.
In networked environments, tables and their associated index files are susceptible to corruption if a workstation crashes or a network failure occurs while the tables and index files are being updated. Building an audit trail to monitor these failures is difficult. Developing a method to recover from incomplete updates is even more difficult. Transaction Processing Systems eliminate these problems and protect database integrity by automatically undoing any updates that were performed in the event of workstation or network failure. This leaves a database exactly as it was before a transaction began.
Transaction Processing is not supported in the Advantage Local Server. Use of Advantage Transaction Processing functionality may appear to complete successfully when using Advantage Local Server, but in fact, use of Transaction Processing features will be ignored by Advantage Local Server applications.
See Transaction Processing System (TPS) for a full explanation of the Transaction Processing System available in the Advantage Database Server.
The Advantage Database Server provides the powerful features of a Transaction Processing System (TPS) for your Advantage applications. Advantage TPS allows an application to perform multiple insert, update, and delete operations to any number of tables with complete confidence that either all of the insert, update, and delete operations will be successful or that none of the operations will occur. In other words, Advantage TPS processes multiple insertions, updates, and deletions as though they were a single operation.
Otto wrote:What if the append is successfully but the delete in the dbf file not?
Otto wrote:Marcelo,
does TPS work with dbf-files or only with the ADS own files?
Regards,
Otto
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 60 guests