Archive for the 'ODBC API Functions' Category

ODBC Function Summary

The following table lists ODBC functions, grouped by type of task, and includes the conformance designation and a brief description of the purpose of each function.
Connecting to a data source
SQLAllocHandle: Obtains an environment, connection, statement, or descriptor handle.
SQLConnect: Connects to a specific driver by data source name, user ID, and password.
SQLDriverConnect: Connects to a specific [...]

SQLBrowseConnect ODBC Function

SQLBrowseConnect supports an iterative method of discovering and enumerating the attributes and attribute values required to connect to a data source. Each call to SQLBrowseConnect returns successive levels of attributes and attribute values. When all levels have been enumerated, a connection to the data source is completed and a complete connection string is returned by [...]

SQLExecute ODBC Function

SQLExecute executes a prepared statement, using the current values of the parameter marker variables if any parameter markers exist in the statement.
SQLRETURN SQLExecute(
SQLHSTMT     StatementHandle);
StatementHandle
[Input] Statement handle.
Returns
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, or SQL_INVALID_HANDLE.
SQLExecute executes a statement prepared by SQLPrepare. After the application processes or discards the results from a call to SQLExecute, the application can [...]

SQLExecDirect ODBC Function

SQLExecDirect executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. SQLExecDirect is the fastest way to submit an SQL statement for one-time execution.
SQLRETURN SQLExecDirect(
SQLHSTMT     StatementHandle,
SQLCHAR *     StatementText,
SQLINTEGER     TextLength);
StatementHandle
[Input] Statement handle.
StatementText
[Input] SQL statement to be executed.
TextLength
[Input] Length of *StatementText in characters.
Returns
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, [...]

SQLAllocHandle ODBC Function

SQLAllocHandle allocates an environment, connection, statement, or descriptor handle.
This function is a generic function for allocating handles that replaces the ODBC 2.0 functions SQLAllocConnect, SQLAllocEnv, and SQLAllocStmt. To allow applications calling SQLAllocHandle to work with ODBC 2.x drivers, a call to SQLAllocHandle is mapped in the Driver Manager to SQLAllocConnect, SQLAllocEnv, or SQLAllocStmt, as appropriate.
SQLRETURN [...]