access violations using ODBC 
Author Message
 access violations using ODBC

I mistakenly posted this to when this
is probably the better choice, so sorry about crossing-posting it.

I have written a server application that uses ODBC to access a
Sybase database using the MFC CRecordset class. Everything works fine
most of the time except that I get an access violation in
libctl.dll periodically. This occurs randomly as far as I can tell. It
seems to happen more frequently when I am making repeated server calls
in rapid succession. I don't think the problem is with my code since the

same call will succeed the once and fail the next time without any
changes to the parameters.

I found an article on MSDN that talked about a problem that seemed close

to what I was experiencing. Essentially, a function in the Odbccr32.dll
(cursor library) is performing a PUSH DWORD PTR instead of acquiring a
byte. Consequently, 3 more bytes are being read than required. This
occurs as the SQL string is being parsed. The article described a fix
(override CRecordset and change it so that 3 extra spaces are added to
SQL string) and I have implemented it. Alas, this failed to correct the
problem. It may have reduced the frequency of access violations but that

is probably just my imagination.

The other solution that the article suggested was 'do not use cursor
library'. Great, suggestion! That's how I fixed my TV when it broke. I
stopped using it and haven't had any problems since. :) Anyway, the
application is 85% complete and I am reluctant to change it all now. Has

anyone else ran into this problem? Can anyone suggest a solution?

Thanks in advance for any help.

                                                Alfred Wurr

Sat, 17 Aug 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Desperado ODBC access violation!

2. HELP!ODBC API call SQLFetchScroll returns Access violation with ODBCCR32.dll

3. HELP!!!! SQLDriverConnect ODBC API Access Violations

4. [Fwd: HELP!!!! SQLDriverConnect ODBC API Access Violations ]

5. MFC ODBC+DB2 DB2CLI = Access violation

6. Strange ODBC errors using DAO to access linked tables in Access .MDB

7. Accessing an Ms Access 2000 Query using VC++, via ODBC

8. Access violations using DAO with VC 4.2

9. Access Violation when using SysReAllocString()

10. Access Violation when ADO is used from global object exported from MFC extensions DLL (VC++)

11. Access Violation using ADO in VC++



Powered by phpBB® Forum Software