Click here to Skip to main content
15,921,959 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Static library size Pin
Michael Dunn3-Mar-02 11:22
sitebuilderMichael Dunn3-Mar-02 11:22 
GeneralRe: Static library size Pin
Tim Deveaux3-Mar-02 14:17
Tim Deveaux3-Mar-02 14:17 
GeneralImage manipulation Pin
3-Mar-02 9:11
suss3-Mar-02 9:11 
GeneralRe: Image manipulation Pin
Christian Graus3-Mar-02 9:16
protectorChristian Graus3-Mar-02 9:16 
GeneralOpening an access database in VC++ Pin
shypht3-Mar-02 8:36
shypht3-Mar-02 8:36 
GeneralRe: Opening an access database in VC++ Pin
Michael P Butler3-Mar-02 9:48
Michael P Butler3-Mar-02 9:48 
GeneralRe: Opening an access database in VC++ Pin
shypht3-Mar-02 12:26
shypht3-Mar-02 12:26 
GeneralRe: Opening an access database in VC++ Pin
Phil J Pearson4-Mar-02 4:23
Phil J Pearson4-Mar-02 4:23 
Newer versions of the database need DAO Version 3.6
You can get this by installing the latest Microsoft database Access Components (if you haven't already done so) but MFC6 still won't use it. You have to mess around a little to fool it into using the right version. There's a kb article somewhere but the following code might show you enough. (Just translate the pjpRegKey::CRegKey to your own method of registry access.)
bool CDatabaseHandler::DAO36Fix()
  {
  bool bRet = false;

  // See if we have the necessary gear to use DAO 3.6
  // If so then bodge the MFC version number appropriately
  if (AfxGetModuleState()->m_dwVersion == 0x600)
    {
    PJPreg::CRegKey regkey(HKEY_CLASSES_ROOT, "CLSID\\{00000100-0000-0010-8000-00AA006D2EA4}\\InprocServer32");
    CString     csPath;

    regkey.GetStringValue("", csPath);
    if (!csPath.IsEmpty())
      {
      if (0 == _access(csPath, 0))
        {
        AfxGetModuleState()->m_dwVersion = 0x601;
        bRet = true;
        }
      }
    }
  return bRet;
  } // CDatabaseHandler::DAO36Fix

Just call this function once during your app's initialisation before you try to open the db.

Hope this helps...



Phil J Pearson
Questiondetermine cpu time of a process ? Pin
3-Mar-02 8:15
suss3-Mar-02 8:15 
AnswerRe: determine cpu time of a process ? Pin
alex.barylski3-Mar-02 9:10
alex.barylski3-Mar-02 9:10 
GeneralRe: determine cpu time of a process ? Pin
3-Mar-02 9:48
suss3-Mar-02 9:48 
GeneralRe: determine cpu time of a process ? Pin
alex.barylski3-Mar-02 13:46
alex.barylski3-Mar-02 13:46 
Generalmerge sort Pin
3-Mar-02 5:46
suss3-Mar-02 5:46 
GeneralRe: merge sort Pin
Michael Dunn3-Mar-02 7:25
sitebuilderMichael Dunn3-Mar-02 7:25 
Generalplease.........................please..................... Pin
3-Mar-02 4:49
suss3-Mar-02 4:49 
GeneralRe: please.........................please..................... Pin
Tim Smith3-Mar-02 5:10
Tim Smith3-Mar-02 5:10 
Generalhere is one memory leak Pin
3-Mar-02 5:11
suss3-Mar-02 5:11 
GeneralRe: here is one memory leak Pin
Christian Graus3-Mar-02 9:02
protectorChristian Graus3-Mar-02 9:02 
GeneralRe: Thanks i got the solution Pin
5-Mar-02 4:08
suss5-Mar-02 4:08 
GeneralRe: Thanks i got the solution Pin
5-Mar-02 4:08
suss5-Mar-02 4:08 
GeneralVSS Header comments Pin
Darren Schroeder3-Mar-02 4:39
Darren Schroeder3-Mar-02 4:39 
GeneralRe: VSS Header comments Pin
Anders Molin3-Mar-02 4:43
professionalAnders Molin3-Mar-02 4:43 
Questionusing namespace std; <-- is evil? Pin
Travis D. Mathison3-Mar-02 4:28
Travis D. Mathison3-Mar-02 4:28 
AnswerRe: using namespace std; <-- is evil? Pin
Todd Smith3-Mar-02 4:41
Todd Smith3-Mar-02 4:41 
AnswerRe: using namespace std; <-- is evil? Pin
Tim Smith3-Mar-02 5:00
Tim Smith3-Mar-02 5:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.