ODBC_SQLEndTran

4D - Documentation   Français   English   German   4D ODBC PRO, Command Theme List   4D ODBC PRO, Command Alphabetical List   Back   Previous   Next

version 2004


ODBC_SQLEndTran (handleType; handleID; completionType) Longint

ParameterTypeDescription
handleTypeLongintType of ID to pass to handleID
handleIDLongintEither the statement ID or the connection ID
completionTypeLongintEither SQL_COMMIT or SQL_ROLLBACK
Function resultLongintReturns the result of the MS ODBC API function
SQLEndTran

Description

The ODBC_SQLEndTran command requests a commit or rollback operation for all active operations on all statements associated with a connection. ODBC_SQLEndTran can also request that a commit or rollback operation be performed for all connections associated with an environment.

If no transactions are active, ODBC_SQLEndTran returns SQL_SUCCESS with no effect on any data sources.

handleType defines which type of ID to pass to handleID and can have one of the following two values:

ConstantDescription
SQL_HANDLE_STMTStatement ID
SQL_HANDLE_DBCConnection ID

handleID is the connectionID if handleType is equal to SQL_HANDLE_DBC. connectionID is a valid connection ID returned by ODBC_SQLAllocConnect and a connection must be established using the ODBC_SQLConnect command.

Otherwise, handleID is the stmtID, which is a valid statement ID returned by ODBC_SQLAllocStmt.

completionType can have one of the following two values:

ConstantDescription
SQL_COMMITCommit changes
SQL_ROLLBACKRollback changes

For more information, please see the SQLEndTran function in the MS ODBC API at http://msdn.microsoft.com/library/en-us/odbc/htm/odbcsqlendtran.asp.

Function Results

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

See Also

ODBC_SQLAllocStmt, ODBC_SQLConnect.


4D - Documentation   Français   English   German   4D ODBC PRO, Command Theme List   4D ODBC PRO, Command Alphabetical List   Back   Previous   Next