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 > DB2 Connection string problem from VC++

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-04, 08:43
krehman krehman is offline
Registered User
 
Join Date: May 2004
Posts: 2
Question DB2 Connection string problem from VC++

Hi,
I am using Win 2k and using VC .net (DB2 CLI library) to connect to database. I am currently connecting to server through DSN and it is working fine, but I don't want to make DSN to connect. Instead, I want to use connection string to connect to the database. I gave the following connection string: -

"driver={IBM DB2 ODBC DRIVER};Database=sample;hostname=192.168.4.8;port= 50000;protocol=TCPIP;uid=db2admin;pwd=click123"

I am connecting to database named "sample" on server whose IP is 192.168.4.8. Username/Password are db2admin/click123. It is giving the following error message: -

"[IBM][CLI Driver] SQL30082N Attempt to establish connection failed with security reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001"

I think 50000 is the default port on which it listens. I have tried changing the port number, but then it gives errors like "Communication could not be established". The username/password works fine when I use it to make DSN in control panel and when I use it on server.

Can anyone tell me why is it giving such message? I'll be really grateful.

Regards,

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