cplusplus.com
C++ : Forum : Windows Programming : Problems with afxdb.h
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


post Problems with afxdb.h

giocarmine (1)
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\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 :)
writetonsharma (1181)
but the error clearly says you are trying to access the private member. did you check that? It will be difficult to tell without seeing the code as i have never used afxdb. you have to paste some basic code.
guestgulkan (2375)
Does the error actually say private or protected ?
writetonsharma (1181)
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'
guestgulkan (2375)
^^^ Easy laddy.
Topic archived. No new replies allowed.