Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Control Error - "Unrecognized database format" 2

Status
Not open for further replies.

SSJpn

Technical User
Oct 7, 2002
259
US
I put a data control on my form and set the DataBaseName property to point at my MS Access database. Then when i go to change the RecordSource property I get a message box with the error "Unrecognized database format 'C:XXXX\XXXX\XXXX' where XXXX\XXXX\XXXX is the location of my database. What is the problem?

Thanks,

Kevin.
 

Are you trying to access a MSAccess2k database? If so then update VB6.0 to SP5.

Good Luck

 
Yes it is a MSAccess2k database. Thanks so much for the help.
 
Dang, I downloaded 'Visual Basic 6.0 Runtime Module SP5 6.00.8964' from Download.com and installed but still doesn't work.. Did I get the right SP? My VS basic version is 6.0 so thats not the problem...

Any other suggestions?
 

I thought that was the fix for it, and after searching this site with your subject line I came up with lots of previous threads. So in short here are the suggestions.

Make sure you have the latest MDAC installed with the correct drivers for your system.

Are you using the dao data control? Make sure you have jet 4.0 installed see previous or use ado data control.

Make sure that there is not a space and an underscore in your path to db section.


Search this site, in your forums using all words and you will see many entries.

Good Luck

 
It's VB6 SP5 that you need - not the runtime!
It's here:
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 

I thought I read that right but did not give it a third thought, I just thought they typed in the wrong thing...

Good Catch johnwm

 
John and vb5Programmer, why is this error coming up? is it Both the file formats are different? I mean the access 97 and the 2000? All the Best
Praveen Menon
pcmin@rediffmail.com
 

1. The original DC shipped with VB5 and VB6 were not compatible to a JET 2000 MDB (or buggy), until VB6 SP3, where it got replaced with a corrected version.

2. Possibly a wrong setting in the Connect Property ("Access" for Jet '97 mdb, and, "Access 2000" for Jet 4.0 MDB)

3. Damaged MDB [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Wrong CCLint.. The problem appears when u try to connect using the Jet OLEDB 3.51 to an Access 2000 DB, and if u use version 4 (of Jet OLEDB ) to connect, it will work fine. Am not making wild guesses to figure out the root of the problem. Having said that, i have in the back of my mind, that a change in file format (from Access 97 to 2000) may cause the error... Does anyone have an accurate idea on the cause of the problem? All the Best
Praveen Menon
pcmin@rediffmail.com
 

My statement is correct.

It is not a problem...but a change.

>The original DC shipped with VB5 and VB6 were not compatible to a JET 2000 MDB

You cannot connect to a Jet 2000 MDB with JET 3.51...
4.0 use UNICODE and 3.51 doesn't.

They are of different format is you will.
What does it matter. The one is still not compatable with the other. Only 4.0 is downward compatible.

[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 

And the problem with the DC from the earlier version is that only 3.51 was built into it (among a few other bugs between updates)

[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 

By the way:
SSJpn is talking about the the basic data control (ref.: property "DatabaseName").

Not the ADO DC, which uses the JET OLEDB data provider, (which the basic data control doesn't).

The basic DC uses DAO and not ADO or the JET OLEDB provider.
You need to update to VB SP3+ (get SP5 however). This will also install the JET 4.0 driver and DAO 3.6, and change out the basic data control making it compatible with DAO 3.6), which is what is needed to connect to a JET 4 MDB (or, ACCESS 2000 mdb, if you wish to call it that)

If you want to use the OLEDB data control, then you need to add that to the project under PROJECT|CONTROLS.
Then, in order to connect to a JET 4.0 db, using the JET OLEDB 4.0 data provider, you need to have MDAC 2.0+ (or was it 1.5+) installed on the system...but, get MDAC 2.5. This is installed with VB6 SP5. This will also install the JET 4.0 OLEDB provider.

If you install a higher version of MDAC, you will need to install the newer version of the JET OLEDB provider seperately ( Jet 4.0 SP6 is the lastest), as this is not included in the MDAC anymore (2.6/2.7)

SSJpn:

1. Make sure you have as a minimum VB6 SP3.
2. Change the "Connect" property to "ACCESS 2000"

It should work now unless the database is corrupted.

If you want to use ADO, then:

1. Best to update to VB6 SP5
2. Set a reference under PROJECT|COMPONENTS to the "Microsoft ADO Data Control 6.0 (OLEDB)
3. Add this to your project, changing out the DAO DC, and, any complex binding controls like the DBGrid will need to be changed out for the ADO ones (such as the DataGrid instead of the DBGrid - this will also need to be added to the project under COMPONENTS).

The JET 4.0 OLEDB via ADO will be somewhat slower on larger databases than the DAO/JET 4.0 version, and the JET 4.0 is somewhat slower than the JET 3.51 version.

There is an extra layer that ADO needs to go through to get data from the JET database manager, and therefore it is slower than DAO.

And, a 4.0 MDB has it's data stored differently (UNICODE) than a JET 3.51. Therefore you cannot open a 2000 MDB with JET 3.51 or earlier.
And, if you try to open a JET '97 db with the JET 4.0, JET needs to do UNICODE conversions on the data coming from and going to the DB, which slows it down even more.
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
You folks are amazing... Ill give it a try

Thanks all!~
 
OK, i got the right SP5 this time and installed files to C:/Program Files/Microsoft Visual Studio/VB98, but I don't see 'Access 2000' in the dropdown menu for the 'Connect' Property. So.... it still doesn't work....

SSJpn
 
I'd suggest not using the data control and using the Microsoft ADO data control instead. Just make sure you set a reference to Microsoft Active X Data Objects 2.x and add the ADO control component. Right-click the control and then go to properties and then set your connection string using the OLEDB Provider for Jet 4.0. If you aren't seeing the Jet 4.0 Provider you need the latest version of MDAC, which can be downloaded at
 
K, I guess Ill give that a try... But now its just bugging me that my first control doesn't work... I kinda wanna get it figured out...

Thanks though for the suggestion.

SSJpn
 
SSJpn

How do you declare your database connection and recordset

i already got that same problem last month and got it right by declaring it right

this is my first declaration that got that same error
dim tmpDB as database
dim tmpRS as recordset

but this one works
dim tmpDB as DAO.Database
dim tmpRS as DAO.Recordset

hope this will help Please pardon the grammar.
Not good in english.
 
Thats great CCLINT, Thanks for all the info. and I think this is more than wot SSJpn was lookin for.. now can i ask ssJPn, wot are u trying to build? A DB Aware control ? All the Best
Praveen Menon
pcmin@rediffmail.com
 

SSJpn:

Then the update wasn't successful.

By the way: I mentioned that the change was made first with SP3.
This is inccorect. It was made with SP4 and later.

Something with the installation wasn't correct.

What is the file name of the service pack which you used?.
Recently we had someone here who installed the wrong package - I believe it was the VB SP5 RunTime files update - instead of the complete VB SP or Visual Studio SP.

Again, this isn't a bug, but it is a change. When VB 6 first came out, JET 2000 db's didn't exist.....Then, in SP4 and later the DC was changed to use DAO 3.6.
If "ACCESS 2000" doesn't show in the dropdown, then sorry to say, but the installation of SP5 didn't execute properly for what ever reasons, or you have the wrong SP file. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top