Creating Access 2000 Database with CDaoDatabase 
Author Message
 Creating Access 2000 Database with CDaoDatabase

Any body know how to create an access database using CDaoDatabase->Create
method().

Here is my code. I need to find out third parameter of Create method, which
is Version30 to create Jet Database 3.5. I am looking for Jet Database
Engien 3.6.

 try
 {
  newDB->Create(szNewDB, dbLangGeneral, 0);
 }
 catch( CDaoException e)

Help appreciated.



Sat, 04 Oct 2003 22:50:06 GMT  
 Creating Access 2000 Database with CDaoDatabase
Before your #include <afxdao.h>
Try this:
#ifdef _MSC_VER
    #undef _MSC_VER
#endif
#define _MFC_VER 0x0601
#include <afxdao.h>
...
...

Then the compiler with use DAO3.6. If you have a look of DAOCORE.CPP you can
see:
#ifndef _AFXDLL
#if _MFC_VER >= 0x0601
#define _AfxDetermineDaoVersion()   (36)
#else
#define _AfxDetermineDaoVersion()   (35)
#endif

In _AfxDetermineDaoVersion body:
{
    BYTE bReturn = 35;

    #ifdef _AFXDLL
     AFX_MODULE_STATE* pModuleState = AfxGetModuleState();
     if (pModuleState->m_dwVersion < 0x421)
          bReturn = 30;
     else if (pModuleState->m_dwVersion >= 0x0601)
          bReturn = 36;
    #endif // _AFXDLL

Quote:
}

Hope this helps

Regards
Andre


Quote:
> Any body know how to create an access database using CDaoDatabase->Create
> method().

> Here is my code. I need to find out third parameter of Create method,
which
> is Version30 to create Jet Database 3.5. I am looking for Jet Database
> Engien 3.6.

>  try
>  {
>   newDB->Create(szNewDB, dbLangGeneral, 0);
>  }
>  catch( CDaoException e)

> Help appreciated.



Sun, 05 Oct 2003 04:35:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating an access 2000 database

2. How to create a new Access database, table, and field using CDaoDatabase, CDasoTableDef

3. MFC CDaoDatabase object and new Office 2000 (w/o Access) crashes

4. CDaoDatabase und ACCESS 2000 Dateiformat

5. CDaoDatabase and Access 2000

6. Problems Using Access 2000 files with the CDaoDatabase classes

7. Problem accessing Access 2000 database using DAO. - URGENT

8. Unrecognized database error after upgrading to Access 2000

9. Reading/writing to an Access 2000 database through the Intenet using WIN32 app

10. connection to an access 2000 database

11. Dynamicly open Access 2000 database

12. Openning Access 2000 database with DAO

 

 
Powered by phpBB® Forum Software