Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello All,

 

I am having a problem related to DB2 and .Net, and was wondering if anyone could help me out. Basically, I can't connect, and I've tried many different ways. I can connect to DB2 if it's on a windows box, but the box I'm trying to connect to is a non-windows box, and is also at a remote location.

 

What I need is to get one of two ways to work, so far I can't get either to work. The first way is using .net OLEDB and connecting via TCP/IP. The other is to use the .net Data application blocks by IBM and connect using the IP address as the server (I think I got in this way but the database name gets padded and then says it can't find it, so it errors out).

 

Can anyone help? thanks!

 

Sample Code:

'using oledb
cs1 = "Provider=DB2OLEDB;Network Transport Library=TCPIP;Network Address=myNetworkAddress;
Initial Catalog=myDB2Database;Package Collection=MyPkgCol;Default Schema=Schema;User ID=myUserId;Password=myPassword"

'using .net dab's from IBM
cs1 = "Database=myDB2Database;UserID=myUserID;Password=myPassword;Server=TCPIPAddress"

 

Thanks,

Brian

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...