Using CDaoRecordset / CDaoDatabase 
Author Message
 Using CDaoRecordset / CDaoDatabase

  I wrote a simple program to fetch some data from a simple access database
(one table)
After creating the CDaoDatabase object, and opening it, I create a
CDaoRecordset object and with a simple query get the data
it all works fine.
  At the end I close both object, and delete them, then I terminate the
thread. It all seems ok but when I close the program I get this error:
First-chance exception in Demo.exe (MFCD42D.DLL): 0xC0000005: Access
after peeking into the MFC code I found that the following call causes it:

void AFXAPI AfxDaoTerm()
  if (pDaoState->m_pDAODBEngine != NULL)
     pDaoState->m_pDAODBEngine->Release();          <-- this is the one!
     pDaoState->m_pDAODBEngine = NULL;


what am I doing wrong?

thanks, DJ

Sat, 02 Nov 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Using CDaoDatabase/CDaoRecordset from inside an ATL/MFC COM Component

2. CDaoDatabase / CDaoRecordset Question

3. CDaoDatabase and CDaoRecordset

4. CDaoRecordSet -- CDaoRecordSet -- CDaoRecordSet

5. CDAODatabase used by MFC and VB

6. Enter data to a database using CDaoDatabase

7. Using CDaoDatabase with Excel file converts string with only spaces to empty string

8. Using multiple databases in CDaoDatabase?

9. Memory Leaks using CDaoDatabase

10. Using CDaoDatabase to Open a Password Protected Access DB

11. Can't open file using CDaoDatabase

12. How to create a new Access database, table, and field using CDaoDatabase, CDasoTableDef


Powered by phpBB® Forum Software