If you have DB2 for Windows installed on your machine, you should have samples of how to connect to DB2 through VB in 'Sqllib\Samples\VB'. In fact, I believe you need it installed on your machine in order to get the drivers required by ODBC. "Connect.vbp" and "Sample.vbp" are 2 examples containing code to connect to DB2.
For DB2 for OS/390, you will need to install DB2 connect ... Then you will have to catalog the remote DB2 Subsystem on the client (You can do this using Client Config Assistant - db2cca) ... When cataloging ensure that you define it as a ODBC data source... Once done, DB2 is like any other ODBC DSN
You should concider using the IBM OLE DB Provider for DB2. Not sure what you application will be doing but this provider gives ADO applications the ability to extract or query DB2 using the natave OLE interface. Hence you'll get better performance over ODBC.
See "Writing Applications Using the IBM OLE DB Provide for DB2" for more details (
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.