--- PgSQL.orig/ODBC/odbcapi.c 2004-01-09 14:22:11.000000000 +0100 +++ PgSQL/ODBC/odbcapi.c 2004-01-09 22:17:41.054945600 +0100 @@ -333,6 +333,7 @@ mylog("[SQLExecute]"); ENTER_STMT_CS(stmt); + if (stmt->status == STMT_FINISHED) SC_clear_error(stmt); ret = PGAPI_Execute(StatementHandle, 0); LEAVE_STMT_CS(stmt);