I am trying to connect to a Microsoft Access DB using VB6, when I create a new connection I Dim DB as Connection, then Set db = New Connection. When the program is ran the complier doesn't recognize the word 'New'. Is there a link I can go to in order to research more about ODBC in order to connect to a Microsoft Access db using VB6. I am trying to look for the correct syntax in order to connect to the DB.

Any help would be appreciated.

Thank You,

Recommended Answers

All 2 Replies

I think that's probably a problem with your references. Go to Project->References and look at your references, it should tell you if something is missing. and if you're using ado, make sure you're using adodb.connection

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.