ODBC_SQLFreeStmt

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

version 2004.4 (Modified)


ODBC_SQLFreeStmt (stmtID; option) Longint

ParameterTypeDescription
stmtIDLongintStatement ID
optionLongintOption to execute
Function resultLongintReturns the result of the MS ODBC API function
SQLFreeStmt

Description

The ODBC_SQLFreeStmt command stops the processing associated with a specific statement, closes any open cursors associated with the statement, discards pending results, or, optionally, frees all resources associated with the statement handle.

stmtID is a valid statement ID returned by ODBC_SQLAllocStmt.

The option parameter can take one of the following values:

ConstantsDescription
SQL_CLOSECloses the cursor associated with StatementHandle (if one was defined)
and discards all pending results
SQL_UNBINDSets the SQL_DESC_COUNT field of the ARD to 0, releasing
all column buffers bound by SQLBindCol for the given stmtID
SQL_RESET_PARAMSSets the SQL_DESC_COUNT field of the APD to 0, releasing all
parameter buffers set by SQLBindParameter for the given stmtID
SQL_DROPFrees the statement handle

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

Function Results

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Example

See the example for the ODBC_SQLFetch command.

See Also

ODBC_SQLAllocStmt, ODBC_SQLFetch.


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