I have to connect to a DB2
database installed on some other system. I have the machine name of the server, the database name to which I would like to connect to, the port number and the credentials. I do not have any client installed on my system for DB2. I want to use OLEDB
connections.
Can I achieve this without installing a client? Also let me know what reference dlls would help me in achieving this i.e. what should I use - IBM OLE DB Provider for DB2 or Microsoft OLEDB provider for IBM DB2 or some other? Where do I find them?
For
OLEDB
refer .NET DB2 OLEDB pre-requisitesAlso refer: what is the difference between OLE DB and ODBC data sources?
For
ODBC
connection, I use the followingConnection String
Code:
I have previously used ODBC, not OLEDB but I'll share the link anyways if you decide to change your mind about ODBC. You will need to, as a minimum, install the Db2 clients and drivers. This installs the IMB DB" odbc driver into your system (odbc data sources). The drivers is found from this site: http://www-01.ibm.com/support/docview.wss?uid=swg27016878.
After installing add references to the IBM.Data.DB2.dll