I've got a VB app I wrote that runs over Access and works pretty well for the most part. However, there are a couple of pages where I get the following error when trying to access a database (no pun intended).

I'm getting the error "Unrecognized Database Format (path to .mdb file)". This seems to happen both if I'm trying to load a grid or a data control. The program keeps running after I hit "OK", but no data is loading into the objects (of course).

Any ideas?

Hi, from my experience, this usually happens when the Access database is corrupt, or in the process of going corrupt. Try using the Access repair utility and see if it corrects your error.

Charles

I've got a VB app I wrote that runs over Access and works pretty well for the most part. However, there are a couple of pages where I get the following error when trying to access a database (no pun intended).

I'm getting the error "Unrecognized Database Format (path to .mdb file)". This seems to happen both if I'm trying to load a grid or a data control. The program keeps running after I hit "OK", but no data is loading into the objects (of course).

Any ideas?

Hi, from my experience, this usually happens when the Access database is corrupt, or in the process of going corrupt. Try using the Access repair utility and see if it corrects your error.

Charles

I'm going under Tools/Database Utilities/Compare and Compact Database, but it keeps giving me the change to open a database over and over, but never to repair it. I'm using Access 2003. What am I missing?

In Access 97, the repair and compact methods are separate. In Access 2003, they appear to be the same. That goes along with everything I've seen ... the JetComp utility does it all in one, and the JRO method does as well.

I assume this didn't fix your problem?

If not, other things I'd check are:

- Try to have the version of the database match the version of Access, if possible. That is, if you have Access 2003, don't use it on an Access 97 or Access 2000 database.
- Check your connection method. How are you establishing the connection to the Access database? The most direct, efficient, and safe is with Jet 4. If you aren't sure, can you post the connection string used on the connection object? (Might be an ADO control or an actual ADODB.Connection object, or something else still.)

I'm going under Tools/Database Utilities/Compare and Compact Database, but it keeps giving me the change to open a database over and over, but never to repair it. I'm using Access 2003. What am I missing?

OK may I know how you create your database? Is it You just type outside your program(By means of opening Microsoft Access manually from outside of VB6)?

You are trying to connect a MSAccess database written in higher version than what the underlying data control is trying to access.

Select the data control and press F4 (properties). Look for Connect property. If is set to 'Access', make it 'Access 2000'. This works if your database is in MSOffice 2000. If your database is in MSOffice 95 or 97, 'Access' value is correct.

Check project references (Project > References menu in VB IDE).
Use the latest DAO version 3.6 (or higher).

This should fix your problem.

If not, repair the database and try to open in MSAccess itself.

If you can not, the database is irrepairable.

OK may I know how you create your database? Is it You just type outside your program(By means of opening Microsoft Access manually from outside of VB6)?

I created all the tables in the database four or five years ago in Access 97.

Hi,

Access 2000 And Greater Versions Cannot be bound to DataControl Control In VB6. For that u will have To Use ADODC Control.

Regards
Veena

Connect property of data control can be set to 'Access 2000' instead of older 'Access'. Just this simple change will work.

Connect property of data control can be set to 'Access 2000' instead of older 'Access'. Just this simple change will work.

I did this and it solved the initial problem. However, now I'm getting the error message:

Couldn't find installable ISAM

Do you know what that's about?

May be you are using a wrong DAO version. Please check if you are using DAO 3.6. (From VB project, use Project > References menu, select Microsoft DAO 3.6 Object Library)

You may be using ADO and DAO simultaneously. In such a case, set DAO to have a higher priority than ADO object library.

Get back to me if this does not solve the problem. I have seen that error message some time back and I could fix it immediately. If you have problems, please give some details on where you get that error message so that I can try to recreate the situation and suggest precise correction

Regards

Uday Wali

Thanks for your posting in 2006 about setting the Data Control property to MS 2000. A simple solution and it really made my day.
Indio 61, new member

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.