i have created a database for subscriptions in MS Access 2007. I want to link it with my forms using the code below but its saying unrecognised database format.

Dim conn As Connection
Set conn = New Connection
conn.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\subscriptions2.mdb".......

Now i have converted it to Access 2000 format and it wont work. I have also converted to acces 2002-2003 but it doesnt work either. i wanted to convert it to Access 97 format but that option is not there on Save As in Access.
Can anyone help because i cant link with the database.
Thank You

Recommended Answers

All 6 Replies

install service pack 6 for vb6.

have you any problem more? if not please solve it.

Try to change your Provider ,., try to use Microsoft Jet 4.0,.I think it's the latest version..,if there are available service packs on their site...,download it and install it on your machine...My MS Access version is 2003, and my programs works smoothly in both 3.51 and 4.0....

[...Just trying to help...]

If u import ur database in msaccsess them u meight this problum
to solve this problem fllow the fllowing steps
1.open ur project
2. Create a new data base
3. Close ur project
4. Open the data base
5. Now import ur table
6. Now u can found ur error is solved

Your connection string is faulty. You need to declare the connection first.

Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\subscriptions2.mdb"
'Ensure that you have referenced MS ActiveX Data Objects Library in Project/Refrences.
'You can also use Jet 4.0 as below

conn.Open "PROVIDER= Microsoft.Jet.OLEDB.4.0;persist security info=false;data source = C:\subscriptions2.mdb"

I hope this solves your problem.

Be a part of the DaniWeb community

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