Home page  
Help >
NAPI tbdrv connect
Version 7.11

tbdrv_connect

 

Connect to a database resource.

 

int        tbdrv_connect(

long lSessionHandle,

                        char *pszDBResource,

                        char *pszConnectString,

                        char *pszUserID,

                        char *pszPassword,

                         int  iAccessMode );

Parameters

lSessionHandle

            [in]

            Session handle returned from tbdrv_alloc_connect()

 

pszDBResource

            [in]

Database name to be opened. If the full path name is not specified, the system will use the default database location. If the session is via a remote server and a path is specified, it must be relative to the remote server.

 

pszConnectString

pszUserID

pszPassword

iAccessMode

            These parameters are unused in the current version and should be set to NULL.

Return Code

SQLDRV_ERROR    

            A general error occurred.

 

SQLDRV_SUCCEED

            The call succeeded.

 

Extended error information is available via tbdrv_get_error()

Comments

Before statements can be executed, a database must be opened via the tbdrv_connect() API.

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.