Connect MS Access to DB2 Express C

Working with DB2 Express C for a while I tried to explore a way through which I can connect any front end application and see if I can get a breakthrough with the native DML's I was performing on the DB2 CLP administrator window on my DB2 tables.

Easiest of all connections to DB2 is through Microsoft Access.

Here are the steps through which you can connect to the database :

Step 1 : Launch the MS Access and create a sample database
Step 2 : On the External Data tab choose ODBC database with second bullet option which gives you a two way interface to your DB2 database / Any database for that matter
Step 3 : Select Machine Data Source, Click New
Step 4 : Create a new data source tab, Choose System Data Source and Click Next
Step 5 : Choose the IBM DB2 ODBC Driver - DB2COPY1, Click Next & Finish
Step 6 : Provide a datasource name of your choice and click OK
Step 7 : Double Click on the datasource name that was just created using the above driver
Step 8 : The connection to DB2 will now be established and you will be able to see all the tables under the database you created the DSN on
Step 9 : Use MS-Access as a front end appliance for your DB2 database

Easy to install, Easy to use. The data you feed into MS-Access directly replicates on the DB2 data server, the only draw back is - the refresh wouldn't work and you will not see data changes when someone updates your database untill and unless you close and re-establish the connection, I am still trying to figure out a way if its possible.

No comments:

Post a Comment