Platform: Visual FoxPro 09.00.0000.3504 for Windows [Nov 4 2005 17:39:44]
Server: PostgreSQL ODBC driver ver. 104
I created repro where VFP application crashes using PostgreSQL ODBC driver.
PostgreSQL ODBC driver developer wrote that VFP breaks ODBC specification and refuses to fix this in ODBC driver release code.
ODBC specification:
| After SQLExecute or SQLExecDirect returns SQL_NEED_DATA and before
| data has been sent for all data-at-execution parameters,
| an application can call SQLCancel to cancel the statement execution.
| After the statement has been canceled, the application can call
| SQLExecute or SQLExecDirect again.
Bind parameters can't be destroyed in SQLCancel.
ODBC application must call FreeStmt(SQL_CLOSE) and
FreeStmt(SQL_RESET_PARAMS). But VFP doesn't call it.
This causes VFP application to crash sometimes in a SQLEXEC() call followed by error returned from server.
Link bug tracker:
http://pgfoundry.org/tracker/index.php?func=detail&aid=1000481&group_id=1000125&atid=538Discussion:
http://archives.postgresql.org/pgsql-odbc/2005-12/msg00144.phpAny idea how to fix this ?
Andrus