TMedConnection.MedAppTmt TMedConnection

procedure MedAppTmt( nAppendTimeout: Integer=0 );

Description

By default, executing TMedTable.AppendRecord or TMedTable.InsertRecord method can cause suspension of execution of the program if other workstation is executing the transaction that inserted the record into the same table. The called method will wait until committing or rolling back the transaction is executed by the other workstation. The MedAppTmt command changes default this behavior. The nAppendTimeout value specifies time in milliseconds after which the method will give up attempts of inserting the record into the locked table. In such case the THbError exception is raised and TMedConnection.hbconn.NetErr returns true. If TMedTable.AppendRecord or TMedTable.InsertRecord method was executed within the transaction, the transaction will not be rolled back. The program may repeat attempts of inserting the record until achieving a desired effect without aborting transaction. Calling MedAppTmt(0) resets inserting behavior to default.