skip to main content
IP API Reference for C/C++ : IP API for C/C++ : OASQLIP_alloc_connect
 

OASQLIP_alloc_connect

The OASQLIP_alloc_connect function allocates a connection handle using the memory tree and returns it in the psqlip_hdbc parameter, initializing the state of the connection handle. This is treated as a connection handle that OpenAccess SDK passes into other third-party SQL engine IP functions that need to do work on behalf of this connection. You can define it as a pointer to any type of structure that you need to maintain your connection information.
int OASQLIP_alloc_connect(
OADS_HDBC sqls_hdbc,
void * pMemTree,
SQLIP_HDBC * psqlip_hdbc)
 
Table 5: Parameters for the OASQLIP_alloc_connect Function 
Parameter
Type
Description
INPUT
 
 
sqls_hdbc
OADS_HDBC
Connection handle.
pMemTree
void *
Tree to use for memory allocation for the connection handle and all associated data. This tree is freed when the IP returns from a call to OASQLIP_disconnect.
psqlip_hdbc
SQLIP_HDBC *
Allocates structure to hold connection information and return a pointer to it. This pointer is passed into connect and other functions.
RETURN
 
 
 
int
OADS_SUCCESS
OADS_ERROR – error allocating a connection handle