msvc 6.0, Access 2000 
Author Message
 msvc 6.0, Access 2000

I'm developing an app using msvc 6.0 (MFC) that will create/open an Access
db.
Access 2000 tells me the db I've created is from an old version (but won't
tell me what).
I downloaded msvc ServicePack 4 and installed it (apparently successfully)
because it claimed to support Jet 4.0.
 I rebuilt the app and created a new db, but get the same message from
Access.
Further, I noticed that the SP4 version of DBDAOINT.H (the one with
dbVersion40 defined) was not copied into my ...\vc98\include directory.
Last, when I call  CDaoDatabase.Create(x,x,64 /*=dbVersion40*/),  I get the
same effect.
What gives?  What do I have to do?
Thanks,
Harrison


Tue, 01 Feb 2005 06:21:23 GMT  
 msvc 6.0, Access 2000
CAUSE
=====
This problem occurs because the MFC DAO classes that ship with VC++ 6.0
load DAO 3.5 (Dao350.dll) by default. DAO 3.5 uses Jet 3.5, which can only
open
Jet 3.5 format (or earlier) databases. In order to avoid the issue, you
need to use DAO 3.6
(Dao360.dll). DAO 3.6 uses Jet 4.0, which can open any available format
Access
database.

RESOLUTION
==========
For MFC 6.0 to load version 3.6 of DAO, you must update the version of MFC
at
run time to MFC version 6.01. This can be achieved by inserting the
following
line of code before you open an Access 2000 database:

   AfxGetModuleState()->m_dwVersion = 0x0601;

Insert this line in the CYourApp::Initinstance() function of your program.



Tue, 01 Feb 2005 11:43:46 GMT  
 msvc 6.0, Access 2000
This seems to work, thank you.  Now how do I get Class Wizard to recognize a
Jet 4.0 db, such that I can base a CDaoRecordSet on it?
Thanks again,
Harrison


Quote:
> CAUSE
> =====
> This problem occurs because the MFC DAO classes that ship with VC++ 6.0
> load DAO 3.5 (Dao350.dll) by default. DAO 3.5 uses Jet 3.5, which can only
> open
> Jet 3.5 format (or earlier) databases. In order to avoid the issue, you
> need to use DAO 3.6
> (Dao360.dll). DAO 3.6 uses Jet 4.0, which can open any available format
> Access
> database.

> RESOLUTION
> ==========
> For MFC 6.0 to load version 3.6 of DAO, you must update the version of MFC
> at
> run time to MFC version 6.01. This can be achieved by inserting the
> following
> line of code before you open an Access 2000 database:

>    AfxGetModuleState()->m_dwVersion = 0x0601;

> Insert this line in the CYourApp::Initinstance() function of your program.



Thu, 03 Feb 2005 02:19:28 GMT  
 msvc 6.0, Access 2000
I'm afraid you can't achieve it.


Mon, 07 Feb 2005 17:54:51 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Access 2000 - VC ++ 6.0 - ODBC

2. Plateform: ACCESS 2000, ADOX, VC 6.0

3. Access 2000 and Visual C++ 6.0

4. How to access OutLook 2000 Contacts using Visual C/C++ 6.0

5. VC 6.0 and Access 2000 not compatible!

6. VC 6.0 and Access 2000 not compatible!

7. How to access OutLook 2000 Contacts using Visual C/C++ 6.0

8. Using MSVC 5.0 and MSVC 6.0 On One Machine

9. Can I mix MSVC 4.0 and MSVC 6.0?

10. Access 2000/Access 97

11. Accessing Access 2000 via DAO

12. Converting Access 97 MDB file to Access 2000

 

 
Powered by phpBB® Forum Software