TUpdateSQLMethod


 

TAstaclientDataSet

 

Unit
AstaClientDataSet

 

Declaration
type TUpdateSQLMethod = (usmNoTransactions, usmUseSQL,
  usmServerTransaction,usmCommitAnySuccess);

 

Description
For use in the TAstaClientDataSet.ApplyUpdates(TransactionMethod:
TUpdateSQLMethod).

 

usmNoTransactions            Do not use a Transaction.

 

usmUseSQL            In ODBC and other databases, transactions can be started using an SQL command. With ODBC it is 'Begin Transaction' and to end the transaction you use 'COMMIT'. See the TAstaClientSocket.SQLTransactionStart and TAstaClientSocket.SQLTransactionEnd properties if you need to configure this for a different SQL command.

 

usmServerTransaction      This is the preferred method of using ApplyUpdates and calls whatever component method that the database in use on the ASTA server uses to start a transaction. In the BDE it uses the TDatabase.StartTransaction. ASTA servers implement this by writing a method for the TAstaServerSocket.OnTransactionBegin event. See the TAstaServerSocket.OnTransactionEnd event which is called on the ASTA server after a transaction has been completed.

 

usmCommitAnySuccess      Commit with Any Success means that rollback will not be called if *any* of the SQL statements succeed. Commit will be called if even just one sql statement succeeds. To make sure all the housekeeping is in order, ASTA will then keep the OldValuesDataSet rows that have failed on the server and delete any rows who's SQL has succeeded on the server.



ASTA Overview TThreadDBAction TUsers.FullIPAddress