I'm about to write an ISAPI DLL on NT 4.0 using VC++ 6.0.
Using various settings while opening the CDatabase/CRecordset objects,
I allways get error messages from thrown exceptions:
- dynasets not supported
- static-cursors required, if snapshop requested
I found no combination of parameters to use the ODBC
MFC classes to even read one record.
Question:
Can I use MySQL using MFC and ODBC with VC++ 6.0?
Is the MySQL ODBC driver thread-safe?
Thanks
Stefan
Here is a code sample:
*************************************************
// simple call to CDatabase.Open failes -> KB Q181434
lCompanyDB.OpenEx(_T("DSN=my2;UID=root;"),
CDatabase::noOdbcDialog);
CGetCompany lCompanyRS( &lCompanyDB );
lCompanyRS.Open( CRecordset::dynaset, NULL );
if ( ! lCompanyRS.IsBOF() )
{
while( ! lCompanyRS.IsEOF() )
{
*pCtxt << _T( "<BR>" );
// *pCtxt << lCompanyRS.m_Name;
lCompanyRS.MoveNext();
}
}
lCompanyRS.Close();
lCompanyDB.Close();
*************************************************