Monday, February 28, 2011

Connect Visual Basic 6 to Microsoft Access 2003?

,
In this topic I am going to show you the simple way on how to connect Visual Basic 6 to Microsoft Access 2003. First you need to make sure that you have DAO 3.6 Object Library in your References.  Click or check it then click OK.

Open Visual Basic 6 > Click Project on the menu bar > References > Look for DAO 3.6 Object Library

DAO stands for Data Access Object which is already included if you install Microsoft Office 2000 and 2003. To know what Data Access Object is available in your computer, just look at the References.

Visual Basic 6 References

As you can see I have two Data Access Object (DAO) which are available in my computer, DAO 3.6 for Microsoft Access 2000 to 2003 and DAO 3.51 for Microsoft Access that is below 2000 like 98 or 95.

Code on how to connect Visual Basic 6 to Microsoft Access 2003:

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\data\database.mdb"

The Microsoft Database Access is located under a folder “data”.


Note: Always check the Visual Basic 6 references

So I hope this topic helps you. Please post a comment if want to ask something about this topic or if you have problems.

0 comments to “Connect Visual Basic 6 to Microsoft Access 2003?”

Post a Comment

 

Topic Central Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger