cyclonebri
Well-known member
Hello All,
I am having a problem related to DB2 and .Net, and was wondering if anyone could help me out. Basically, I cant connect, and Ive tried many different ways. I can connect to DB2 if its on a windows box, but the box Im 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 cant 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 cant find it, so it errors out).
Can anyone help? thanks!
Sample Code:
[VB]
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 dabs from IBM
cs1 = "Database=myDB2Database;UserID=myUserID;Password=myPassword;Server=TCPIPAddress"
[/VB]
Thanks,
Brian
I am having a problem related to DB2 and .Net, and was wondering if anyone could help me out. Basically, I cant connect, and Ive tried many different ways. I can connect to DB2 if its on a windows box, but the box Im 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 cant 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 cant find it, so it errors out).
Can anyone help? thanks!
Sample Code:
[VB]
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 dabs from IBM
cs1 = "Database=myDB2Database;UserID=myUserID;Password=myPassword;Server=TCPIPAddress"
[/VB]
Thanks,
Brian