This is a discussion on DB2 UDB API SQLSetConnectAttr(hdbc,SQL_ATTR_CONNECT_NODE,node, SQL_NTS) within the DB2 forums, part of the Database Server Software category; --> I want to connect to multiple database partitions within one C program. I try to call the following APIs. ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I want to connect to multiple database partitions within one C program. I try to call the following APIs. It just doesn't work. Can some expert show me one example? int node=1; rc = SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,henv ); /* allocate an environment handle*/ rc = SQLAllocHandle(SQL_HANDLE_DBC,*henv, hdbc); /* allocate a connection handle */ rc = SQLSetConnectAttr(hdbc,SQL_ATTR_CONNECT_NODE,node, SQL_NTS); rc = SQLConnect(*hdbc, server, SQL_NTS, NULL, SQL_NTS, NULL, SQL_NTS); |