Access violations once OCBC/CRecordset added to console app

Access violations once OCBC/CRecordset added to console app

Author

Message

Randall J. Par#1 / 1

Access violations once OCBC/CRecordset added to console app

Using MSVC 4.2 on Windows 95.

I have an relatively simple console application framework that works fine UNTIL I include a header and object file which impliment a class derived from CRecordset (which in turn includes the afxdb.h and associated headers)

After this is included and linked I get unhandled exceptions indicating "Access Violations".

When my app framework classes are in a DLL, I get Access Violations when my class attempts to access local variable named Ta when there also exists a global variable named Ta. If I scope the references to global (ie ::Ta); no violations (but I'm accessing the global rather than the local Ta)

When my app framework classes are in a static lib, and linked with the app, I get Access Violations when my class attempts to access the global version ::Ta and no violations when I access the local version.

I think there is something fundemental about using ODBC/MFC classes in console apps and/or with third party libs that I am missing.

Any help pointing me in the right direction would be greatly appreciated.