CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009

    Problem with afxdb.h


    I'm writing a simple console application using Visual Studio 2008 pro.
    I need to connect to an Access database, so i decided to use MFC libraries.

    I included afxdb.h, but when i compile my application, i get the following errors:

    d:\programmi\microsoft visual studio 9.0\vc\atlmfc\include\afxdb.h(318) : error C2248: 'CObject::CObject': unable to access to private member declared in class 'CObject'

    d:\programmi\microsoft visual studio 9.0\vc\atlmfc\include\afxdb.h(957) : error C2248: 'CObject::CObject': unable to access to private member declared in class 'CObject'

    I found on google something about problems with afxdb.h using Unicode.
    I checked all my project configuration and i removed the only reference to Unicode that i found, precisely i set the character set to "undefined".

    I hope someone can give me an hint..
    thank you in advice

  2. #2
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: Problem with afxdb.h

    What type of project did you create? Is it an MFC project?

  3. #3
    Join Date
    Aug 2008

    Re: Problem with afxdb.h

    where you #include "afxdb.h".
    You just #include "afxdb.h" in stdafx header file.May be your problem solved.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.