Unix Technical Forum

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

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. ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:32 AM
gaohongwei@gmail.com
 
Posts: n/a
Default 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);

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:03 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com