473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1441

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: M. Oakley | last post by:
We are using ODBC connection pooling with SQL Server 2000 v5 on Win 2000 v5 sp4. Each time we get a connection, SQLConnect, we see the memory usage go up, about 52K. When we return the...
0
by: Ianice Berg | last post by:
What should I be doing to get SQLFetchScroll() working (at all) with MS Access? When I specify SQL_CUR_USE_IF_NEEDED then attempting to set SQL_SCROLLABLE results in an "optional feature not...
4
by: David Siroky | last post by:
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env,...
0
by: 이재국 | last post by:
Please help point me in the right direction. I am trying to SQLDriverConnect to our Oracle Server, which resides on another machine in the network. I believe I have the ODBC connection set up...
2
by: ajay978 | last post by:
Hi, I am trying to call SQLSetConnectAttr api but I am getting following error: SQLSTATE: HY024 Native: -99999 Message: CLI0191E Invalid attribute value. SQLSTATE=HY024 I have...
1
by: oddbande | last post by:
I get a lot of these messages in db2diag.log - seems like problems with health Monitor: 2007-01-05-15.05.06.380000+060 I260759H331 LEVEL: Severe PID : 3860 TID : 4004...
0
by: Peter | last post by:
Hi all, I am having trouble to get the bulk copy operations working in collaboration with SQL Native Client. My test program crashed with an access violation in the call to bcp_init. I...
1
by: gnanapoongothai | last post by:
i Am programming to establish connectivity to Mysql server and when setting the attribute to the environment handle the error is invalid valueptr to the attribute. And also the connection handle is...
0
by: kishoramballi | last post by:
Hi, I have created table using following sql statement through psql tool in test database using create table t1(f1 int); table is created. Now I am using an odbc script to insert 5 records....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.