Problem accessing Access 2000 database using DAO. - URGENT 
Author Message
 Problem accessing Access 2000 database using DAO. - URGENT

My application uses DAO classes for accessing the database. Initially
the database used was access 97. Now I have to access "Access 2000
database". I am getting the error unrecognised database format. I
found in the MSDN documentation that I have to make my application to
use DAO 3.6 to solve the problem. By default, it links with DAO 3.5
libraries which do not support Access 2000 database.
To make the application use DAO 3.6, it is told that we have to add
following code in daocore.cpp of MFC source.
#undef _MFC_VER
#define _MFC_VER 0x0601
and then compile the MFC source using nmake. This modification needs
to be done for the applications that statically link to MFC libraries
and I am statically linking to the MFC libraries.
I did the above changes and compiled MFC source using nmake
DEBUG=1..... it works fine for the debug version of my application.
But if I do "nmake DEBUG=0", build the release version of MFC
libraries ....and then build the release version of my application, it
doesn't work.
I get the message "unrecognised database format" again.

What can be the reason? Is it that the release version of the static
MFC libraries not built properly when I say nmake DEBUG=0? Or is there
any other methods of building release version of static MFC libraries?

I have installed MDAC 2.1 and also I have installed service pack 3 of
Microsoft Visual Studio.

Please help me ... I have been trying this since a month... I have to
meet the deadlines..

Regards
vadi



Mon, 07 Nov 2005 14:02:02 GMT  
 Problem accessing Access 2000 database using DAO. - URGENT
Vadi,

It would be nice if MSFT would take that KB article out -- it offers very
bad advice....

Rebuilding the MFC libs *IS A VERY BAD THING* - especially if there are
options that do not require it.

have a look at this article.
http://www.microsoft.com/msj/0100/c/c0100.aspx

about half way through the article there is a picture of this "smart looking
youth (aka Paul DiLascia)" -- scroll just past that and you should find the
Q/A that refers to the KB Article Q236991 - I am assuming that this is the
article to which you refer...  Paul offers a solution that solves the
problem (as any solution would) and does not require that you assume support
for entirety of MFC.

I hope this helps...

regards
roy fine


Quote:
> My application uses DAO classes for accessing the database. Initially
> the database used was access 97. Now I have to access "Access 2000
> database". I am getting the error unrecognised database format. I
> found in the MSDN documentation that I have to make my application to
> use DAO 3.6 to solve the problem. By default, it links with DAO 3.5
> libraries which do not support Access 2000 database.
> To make the application use DAO 3.6, it is told that we have to add
> following code in daocore.cpp of MFC source.
> #undef _MFC_VER
> #define _MFC_VER 0x0601
> and then compile the MFC source using nmake. This modification needs
> to be done for the applications that statically link to MFC libraries
> and I am statically linking to the MFC libraries.
> I did the above changes and compiled MFC source using nmake
> DEBUG=1..... it works fine for the debug version of my application.
> But if I do "nmake DEBUG=0", build the release version of MFC
> libraries ....and then build the release version of my application, it
> doesn't work.
> I get the message "unrecognised database format" again.

> What can be the reason? Is it that the release version of the static
> MFC libraries not built properly when I say nmake DEBUG=0? Or is there
> any other methods of building release version of static MFC libraries?

> I have installed MDAC 2.1 and also I have installed service pack 3 of
> Microsoft Visual Studio.

> Please help me ... I have been trying this since a month... I have to
> meet the deadlines..

> Regards
> vadi



Mon, 07 Nov 2005 14:16:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with DAO direct calls and Access 2000 databases

2. DAO & ACCESS 2000 database problem

3. DAO problems using windows XP and access 2000

4. Problems with updating an Access 2000 database using CDatabase and CRecorset-derived class in MFC

5. Openning Access 2000 database with DAO

6. DAO 3.6 fails to compact Access 2000 databases

7. Accessing Access 2000 via DAO

8. how to use DAO to access ACCESS 2000

9. How to read Access 2000/2002 DB using VC++ 6 and DAO

10. version 6 of MS VC++ and Access 2000 using dao

11. Solutions for using DAO on Access 2000 (Y2K)

12. version 6 of MS VC++ and Access 2000 using dao

 

 
Powered by phpBB® Forum Software