CRecordset Open Access violation 
Author Message
 CRecordset Open Access violation

I am periodically getting an access violation when opening a recordset.
In debug mode the program stops at the point where the error occurs but
it is in assembly somewhere in LIBCTL.DLL and not very helpful. I've
narrowed the problem down to a call to Open().

The program is a multi-threaded server that clients connect using
sockets to make various database calls, etc. This exception occurs
sporadically, particularly when multiple calls are being made. I
searched on MSDN and found an article that seemed to describe the
problem I am having. I've included the gist below. The odd thing is that
the article claims that the bug it describes was fixed with version 3.5
of Odbccr32.dll which is what I am using ( to be precise). Was
this fixed or not? Has anyone had the same problem? Any advice or ideas
would be appreciated.

                                                    Thanks, Alf.

   BUG #: 4797 (NT: ODBC30)

   An ODBC application may get an access violation (AV) using the ODBC
cursor library (Odbccr32.dll) if both of the
   following conditions are true:

        It creates more than one CRecordset objects.
        The following operations are done repeatedly on the CRecordset
        Open, MoveLast or Requery and Close.

   The access violation error happens when the application tries to use
the Close method of CRecordset or invoke the
   SQLFreeStmt ODBC function.


   Microsoft has confirmed this to be a problem in Open Database
Connectivity version 3.0. This problem has been
   corrected in Open Database Connectivity version 3.5.

Tue, 16 Jul 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Access Violation when calling CRecordset::Requery()

2. NTDLL.DLL Access Violation in CRecordset-derived class?

3. Access violations once OCBC/CRecordset added to console app

4. CRecordset - access violations

5. CRecordset access violation

6. CRecordset Access Violation

7. Access violation in CRecordset.Close()

8. Memory access violation using CRecordset and date/time fields

9. Access Violation when calling CRecordset::Requery()

10. Open Connection Access Violation for ADO in ATL COM

11. _RecordsetPtr->Open() generates Access Violation

12. Access violation in ntdll after opening CDatabase


Powered by phpBB® Forum Software