skip to main content
Interface Provider API : Reference : OAIP_connectW (Unicode version)
 

OAIP_connectW (Unicode version)

int OAIP_connectW(
    DAM_HDBC dam_hdbc,
    IP_HENV henv,
    XM_Tree * pMemTree,
    OAWCHAR * sDataSourceName,
    OAWCHAR * sUserName,
    OAWCHAR * sPassword,
    OAWCHAR * sCurrentCatalog,
    OAWCHAR * sIPProperties,
    OAWCHAR * sIPCustomProperties,
    IP_HDBC * phdbc )
Table 3. Parameters for OAIP_connectW (Unicode)
Parameter
Type
Description
IN
dam_hdbc
DAM_HDBC
The connection handle.
henv
IP_HENV
The data structure allocated by the IP to keep its information.
pMemTree
XM_Tree *
The tree to use for allocating memory.
sDataSourceName
OAWCHAR *
The name of the Data Source to which the connection is being made.
sUserName
OAWCHAR *
User name passed in by the client.
sPassword
OAWCHAR *
Password passed in by the client.
sCurrentCatalog
OAWCHAR *
Name of the catalog to use. The value can be specified by the client or in the DataSourceCurrentCatalog attribute.
sIPProperties
OAWCHAR *
Data source specific information that is set in the DataSourceIPProperties attribute.
sIPCustomProperties
OAWCHAR *
Custom properties passed in by the client. The keywords that can appear in this string are based on the setting of the DataSourceIPCustomProperties attribute.
OUT
phdbc
IP_HDBC *
A pointer to data structure allocated by the IP to keep its connection information. This handle is passed in to the IP on subsequent IP calls. The OpenAccess SDK SQL engine does not look at information pointed to by this pointer - it is strictly for the IP's own use.
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure
The sUserName and sPassword are valid only if the data source attribute DataSourceLogonMethod is set to DBMSLogon(UID,PWD) or DBMSLogon(DBUID,DBPWD). Refer to the OpenAccess SDK Administrator's Guide to learn what this attribute must do to support Microsoft Windows authentication (NTLM or Kerberos) and to learn about all of the logon methods that are supported.
The sIPCustomProperties string contains the information that was supplied by the user, including any custom options that your IP supports. The string contains all the options as semicolon separated values. Each value consists of the option name and its setting. This allows your IP to support its own keywords for specifying connection level information.
In this section: 
* Using COM Objects from the IP
* Supporting Failover and Load Balancing