If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Connecting to remote db2 server from Visual C++ code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-24-04, 10:34
krehman krehman is offline
Registered User
 
Join Date: May 2004
Posts: 2
Question Connecting to remote db2 server from Visual C++ code

Hi,
I have made a Visual C++ application. I run that application on the machine which has DB2SERVER installed, and it went fine, but when i run it on a machine having only DB2CLIENT installed, it doesn't work. I am using DB2 CLI Library.

It returns SQL_ERROR from SQLConnect() function and doesn't recognize the Server name. I am only giving database name in argument#2. Moreover, when I try to connect from DB2CLIENT command line processor, it doesn't give any problem and connects fine.

I was thinking that there may be some prefix that we have to add before the dbalias in order to connect or or we have to start some service before connecting from code, but I don't know exactly what to do?

Does anybody have any idea regarding this problem? I would be very thankful if anyone can solve this problem for me.

Regards,

- Khaliq
Reply With Quote
  #2 (permalink)  
Old 05-24-04, 10:37
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Can you post the exact error message ?

Your db2 version information may also help you to get a better answer

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On