snorkelgirl
Programmer
My CDatabase object defaults to ODBC 2.0 behavior, when I need 3.0 behavior.
CDatabase defaults to ODBC 2.0 behavior by calling SQLAllocEnv from its AllocConnect function. I derived a new OpenEx function which incorporates the AllocConnect functionality, but instead calls SQLAllocHandle and SQLSetEnvAttr to set the ODBC behavior to 3.0.
But later I have problems when CDatabase functions use pDbState->m_henvAllConnections, which doesn't reflect my values. And it appears CDatabase calls functions which are specific to ODBC 2.0.
Is there any other way to set the ODBC behavior to 3.0?
Or is there a more current version of CDatabase which defaults to 3.0? (I am using version 4.2)
Finally, if I must use a derived class, how do I include the line PROCESS_LOCAL(_AFX_DB_STATE, _afxDbState) so the CDatabase class uses the same object?
Please help! This is driving me crazy.
CDatabase defaults to ODBC 2.0 behavior by calling SQLAllocEnv from its AllocConnect function. I derived a new OpenEx function which incorporates the AllocConnect functionality, but instead calls SQLAllocHandle and SQLSetEnvAttr to set the ODBC behavior to 3.0.
But later I have problems when CDatabase functions use pDbState->m_henvAllConnections, which doesn't reflect my values. And it appears CDatabase calls functions which are specific to ODBC 2.0.
Is there any other way to set the ODBC behavior to 3.0?
Or is there a more current version of CDatabase which defaults to 3.0? (I am using version 4.2)
Finally, if I must use a derived class, how do I include the line PROCESS_LOCAL(_AFX_DB_STATE, _afxDbState) so the CDatabase class uses the same object?
Please help! This is driving me crazy.