P
perry59
I am a novice C++ programmer, making dll's for use in AutoCad.
I am currently extracting some info from drawings and writing it out to
an access database.
What I have done works fine, with the exception that it creates an
access97 file. Since everyone here is using access 2000 there is a
compatibility problem. I had read that it was possible to force MFC to
use the dao 3.6 with the following code snippet....
//try to force use of DAO 3.6
#ifdef _AFXDLL
AFX_MANAGE_STATE(AfxGetModuleState()->m_dwVersion = 0x0601); //syntax
error : missing ';' before '->'
#else
AFX_MANAGE_STATE(AfxGetStaticModuleState()->m_dwVersion =
0x0601); //syntax error : missing ';' before '->'
#endif
AfxDaoInit();
However, as you can see by my comments, I get comiler errors. I am
assuming I have this problem because I am creating a .dll as opposed to
a standalone app. (using MFC as a shared dll). Is this true? If so, how
would I modify the above code to work in my project?
Thanks for any help.
I am currently extracting some info from drawings and writing it out to
an access database.
What I have done works fine, with the exception that it creates an
access97 file. Since everyone here is using access 2000 there is a
compatibility problem. I had read that it was possible to force MFC to
use the dao 3.6 with the following code snippet....
//try to force use of DAO 3.6
#ifdef _AFXDLL
AFX_MANAGE_STATE(AfxGetModuleState()->m_dwVersion = 0x0601); //syntax
error : missing ';' before '->'
#else
AFX_MANAGE_STATE(AfxGetStaticModuleState()->m_dwVersion =
0x0601); //syntax error : missing ';' before '->'
#endif
AfxDaoInit();
However, as you can see by my comments, I get comiler errors. I am
assuming I have this problem because I am creating a .dll as opposed to
a standalone app. (using MFC as a shared dll). Is this true? If so, how
would I modify the above code to work in my project?
Thanks for any help.