DbTransactionBegin

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean DbTransactionBegin( ref SalSqlHandle hSql )

The DbTransactionBegin method starts a client-controlled transaction.

Parameters

Name Description
ref SqlHandle hSql Handle that identifies the database connection to start a transaction for.

Returns

The return value is TRUE if the transaction is successfully started, FALSE otherwise.

Comments

Applications do not need to call DbTransactionBegin when during the standard save-procedure (this is handled by the framework). However applications must manage the transactions for any database updates that are not a part of standard framework procedures.

Example

Add new C# coding

If DbTransactionBegin( hSql )
   If DbPLSQLBlock( hSql, '&AO.COMMAND_SYS.Remove__(
                     :i_hWndSelf.tbwCustomer.colsCommandId )' )
      Return DbTransactionEnd( hSql )
   Call DbTransactionClear( hSql )
Return FALSE