List:MySQL ODBC« Previous MessageNext Message »
From:Pat Sherrill Date:March 17 1999 12:24pm
Subject:Re: ODBC/MFC problem
View as plain text  
Stefan,

The path of least resistance would be to create a jet DB link to the ODBC
driver for the mysql database.  In this way, you can use dynamic recordsets.
You do, however, need to then deal with the thread-safe issues of DAO.  At
this time, myodbc relies on manager cursors since mysql does not yet
implement cursors.

I hope this helps.

Pat Sherrill...

-----Original Message-----
From: Stefan Pantke <Stefan_Pantke/cubic/de@stripped>
To: myodbc@stripped <myodbc@stripped>
Date: Tuesday, March 16, 1999 7:57 PM
Subject: ODBC/MFC problem


>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();
>*************************************************
>
>
>
>---------------------------------------------------------------------
>To request this thread, e-mail myodbc-thread42@stripped
>To unsubscribe, e-mail the address shown in the
>List-Unsubscribe header of this message.
>For additional commands, e-mail: myodbc-help@stripped
>
>

Thread
ODBC/MFC problemStefan Pantke17 Mar
Re: ODBC/MFC problemPat Sherrill17 Mar