Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Question Unanswered: Connecting to remote db2 server from Visual C++ code

    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.


    - Khaliq

  2. #2
    Join Date
    Aug 2001
    Can you post the exact error message ?

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

    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts