Problem with afxdb.h

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pytone
    New Member
    • Nov 2009
    • 1

    Problem with afxdb.h

    Hello,

    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\mi crosoft visual studio 9.0\vc\atlmfc\i nclude\afxdb.h( 318) : error C2248: 'CObject::CObje ct': unable to access to private member declared in class 'CObject'

    d:\programmi\mi crosoft visual studio 9.0\vc\atlmfc\i nclude\afxdb.h( 957) : error C2248: 'CObject::CObje ct': 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 :)
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    It's odd that there woul be problems usuing Unicode considerering that all internal Windows stuff is all implemented using Unicode.

    In fact, if you specify the MultiByte character set, all you do is invoke wrappers that convert your stuff to Unicode and then make the same call as the Uncode implementation.

    Have you set up your project to support MFC?

    Comment

    Working...