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);