Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 1.7 KB

SQLAllocHandle.md

File metadata and controls

60 lines (44 loc) · 1.7 KB

Home

Function name : SQLAllocHandle

Group: ODBC API - Library: odbc32


SQLAllocHandle allocates an environment, connection, statement, or descriptor handle.


Code examples:

Enumerating ODBC Data Sources available on the local computer
Testing an ODBC connection for supporting specific functionality
Using vendor-neutral SQL constructs
Using SQLBrowseConnect to connect to a data source through a number of iterative calls (SQL Server)
Retrieveing general information about the driver and data source associated with an ODBC connection
Establishing connection using the SQLDriverConnect
Obtaining list of tables stored in an ODBC Data Source

Declaration:

SQLRETURN SQLAllocHandle(
     SQLSMALLINT     HandleType,
     SQLHANDLE     InputHandle,
     SQLHANDLE *     OutputHandlePtr);  

FoxPro declaration:

DECLARE SHORT SQLAllocHandle IN odbc32;
	INTEGER   HandleType,;
	INTEGER   InputHandle,;
	INTEGER @ OutputHandlePtr  

Parameters:

HandleType [Input] The type of handle to be allocated by SQLAllocHandle (predefined value).

InputHandle [Input] The input handle in whose context the new handle is to be allocated.

OutputHandlePtr [Output] Pointer to a buffer in which to return the handle to the newly allocated data structure.


Return value:

SQL_SUCCESS (0), SQL_SUCCESS_WITH_INFO, SQL_INVALID_HANDLE, or SQL_ERROR.