No compatability VB 6.0 with MS Access
I've got MS Access 2002 and VB 6.0. Using Datacontrol in my project in DataName properties I show the path of db which I want to connect. But "Unrecognized Database format c:\....bla bla bla" appears all the time. I'm newbie in VB programming and I ask for your advise. So far I've downloaded MDAC version 2.8 but no result. I think my problem is about compatability the latest Access version with VB 6.0 isn't it?
Thaks in advice
Re: No compatability VB 6.0 with MS Access
Verify that your db is not corrupted. In Explorer double-click your db and see
if opens up correctly without any errors. If it gives the same error then you
need to repair it if possible.
Re: No compatability VB 6.0 with MS Access
I believe MDAC 2.8 is for Access 2003 so try using previous version instead if you have one or download from MS and install it first.
Re: No compatability VB 6.0 with MS Access
Hey Rhino, isnt MDAC still backwards compatible in 2.8?
Re: No compatability VB 6.0 with MS Access
No, not necessary - esspecially most latest and greatest ...
Re: No compatability VB 6.0 with MS Access
:( Good thing I have not upgraded from 2.7 SP1 Refresh.
Re: No compatability VB 6.0 with MS Access
:afrog:
EDIT: you may download and install it as multiple versions can co-exist without any problems (at least I haven't noticed any so far).
Re: No compatability VB 6.0 with MS Access
kedaxx,
You might want to re-install and check the JET engines you are attempting to use. You should be using JET 4.0
Re: No compatability VB 6.0 with MS Access
I had a problem once with reading a database so i converted it to the previous version and it worked fine. Hope it helps. :)
Re: No compatability VB 6.0 with MS Access
Quote:
Originally Posted by HellRaider
I had a problem once with reading a database so i converted it to the previous version and it worked fine. Hope it helps. :)
OK, thank you very much! But how am I going to convert it to a previous version? Would u be so kind to explain that with more details, please!! As I said I'm newbie...
kedaxx :-)
Re: No compatability VB 6.0 with MS Access
Nooooo !
You don't have to do that at all. Don't downgrade your environment because of some drivers.
As I said just get previous version of MDAC 2.5 or 2.7 (I believe that's the one) from MS and install it. When you done change refences in your project to the appropriate library.
Here is link to download MDAC 2.7 .
Although, as randem suggested make sure you have JET 4.0 installed.
Here is a link to download JET 4.0 .
Good luck to you.
Re: No compatability VB 6.0 with MS Access
hello RhinoBull,
i've downloaded the two required files and installed them on my PC, but the same message in run-time VB "..Unrecognized db format.." appeared again. I've created a new db in Access 2002 (after installation two files) , restarted my PC but alas...No resault. Just after convertion my db to Access97 my project ran the application.
P.S. I'v got VB98, is it very old for Access 2002?
Thanks a ot anyway
kedaxx
Re: No compatability VB 6.0 with MS Access
Hmmm ..
According to my research Access 2002 is defaulted to Access 2K format which means you might need MDAC 2.6 or 2.5 version (they both work with MS Access 2K fine). Get it from MS but as I said do not downgrade your database.
Re: No compatability VB 6.0 with MS Access
kedaxx,
What does your connection string look like?
Re: No compatability VB 6.0 with MS Access
Quote:
Originally Posted by randem
kedaxx,
What does your connection string look like?
i'm sorry, randem, but I dont know how to answer on your question (i know it sounds stupid) I have got just couple of months of experience in VB, thats all very interesting & very new for me!!
kedaxx :)
Re: No compatability VB 6.0 with MS Access
So how are you opening your DB from VB?
Tg
Re: No compatability VB 6.0 with MS Access
He is using a data control, so probably he just browsed to the database in the properties window.
I don't know if this old datacontrol can be used for newer versions of access.
If so, then probably the reference to DAO is to version 3.5 or 3.51 and not to 3.6.
Check your DAO references. If a version below 3.6 is referenced, uncheck it, and check DAO 3.6
If this still doesn't work, use an ADO datacontrol instead, or even better, don't use datacontrols at all but write your own code to handle the data manipulation.
Re: No compatability VB 6.0 with MS Access
Quote:
Originally Posted by techgnome
So how are you opening your DB from VB?
Tg
hello,
OK, this is an easy question! :)
1-I create in Access a db with three fields(name,surname, salary -for example)
2-I create in VB a form with database control and three txtBoxes & couple of cmd buttons
3-in DatabaseName database control properties I show the path of my db created in Access
4-and in RecordSource I show the name of my table -(Salary)
5-txtName/Surname/salary in DataField properties I define what kind of data they r going to contain
5-run the project
i hope this is enough to understand the string connection i've got because English is not my mother language
kedaxx
Re: No compatability VB 6.0 with MS Access
kedaxx,
Not as easy as you think. What you need to do is post your project so we can take a look.
Re: No compatability VB 6.0 with MS Access
[QUOTE=Frans C]He is using a data control, so probably he just browsed to the database in the properties window.
hello Frans C,
you were right about "browsing", but i'm not "he" i'm "she" :) .And it seems i've solved the problem. i've picked up an old good tutorials by Chuck Easttom where he shows how to create a db by using Add-ins->Visual data Manager. So i've got what i wanted (maybe this is not the best way to deal with db, but its OK for now...)
And a bit about ADO...I followed your instructions "check-uncheck 3.6...", and after the OK button has been clicked the message appears:"Name conflicts with existing module, project or object library."
VB is more complicated thing than I thought. I've got to learn a lot about different subjects, etc. I spent 5 days to understand why Access2002 doesnt work with VB 6. But thanks to you guys for being helpful. I've learned a lot on the forum. I wish you all Merry Christmas and Happy New Year!
Bye for now
kedaxx
Re: No compatability VB 6.0 with MS Access