469,578 Members | 1,869 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

DB2 UDB API SQLSetConnectAttr(hdbc,SQL_ATTR_CONNECT_NODE,node, SQL_NTS)

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

Jul 2 '06 #1
0 1395

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by M. Oakley | last post: by
reply views Thread by 이재국 | last post: by
2 posts views Thread by ajay978 | last post: by
1 post views Thread by oddbande | last post: by
reply views Thread by Peter | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.