ODBC 3.51 DLL crashing after errors

------=_NextPart_000_0010_01C60AE6.58D0E9C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Versions: ODBC 3.51, Windows XP and MySQL 5.0.16.

I have a C++ program that builds DDL statements in a loop.
A bit like this:

while ( thereismoretodo )
{
makecommandbuffer ( sqlcmdbuf ) ; // with create xxx text
sqlexecdirect ( hstmnt , sqlcmdbuf ) ;
}

The loop completes if there are no errors in the sqlcmdbufs.

If there is a syntax error in a sqlcmdbuf, ODBC reports it,
and then crashes in the ODBC DLL when doing the
next sqlcmdbuf, even if that is error free.

MYODBC3! 048f724a()
ODBC32! 1f7bf622()
Memory access violation at 0xc0000005

At this stage it would appear that ODBC does not 'clear'
itself properly to be ready for the next sqlexecdirect.

When eliminating the error the next sqlcmdbuf will execute
OK, so the problem is consistent and reproducable. Can't do
editing by hand though, since there could be hundreds of DDLs
to patch.
The loop logic above works when porting DDLs to DB2,
even if there are errors.

I have been thinking about disconnecting and reconnecting
in the loop, but that may be too much of a sledge hammer.

Are there other ways to help ODBC back on track after
errors?

Best regards
Ken Resander
..

------=_NextPart_000_0010_01C60AE6.58D0E9C0--
Ken Resander [ Di, 27 Dezember 2005 06:06 ] [ ID #1117287 ]
Datenbanken » gmane.comp.db.mysql.windows » ODBC 3.51 DLL crashing after errors

Vorheriges Thema: Installation problem with MySQL version 3.23.58
Nächstes Thema: Hebrew in MySQL