[ODBC] ODBC connections go dead after a failed query?
От | Jack C. Wei |
---|---|
Тема | [ODBC] ODBC connections go dead after a failed query? |
Дата | |
Msg-id | CAK_oiDawtT66a4+QmbQw2CcgbuRxKrar8wYnLC1qSwzp5ArGNA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [ODBC] ODBC connections go dead after a failed query?
Re: [ODBC] ODBC connections go dead after a failed query? |
Список | pgsql-odbc |
Hi,
We have some legacy SQL queries that works on SQL Server but not on PostgreSQL due to SQL Server-specific syntax, which we are working to migrate. The problem is sometimes psqlodbc just cannot seem to reset itself after a bad query and simply go dead. All subsequent queries on the same connection, legitimate or not, would fail.
I've verified this can happen with the latest PostgreSQL 9.6.2 and psqlodbc 09_06_0100, on a Windows 7 x64 host.We have some legacy SQL queries that works on SQL Server but not on PostgreSQL due to SQL Server-specific syntax, which we are working to migrate. The problem is sometimes psqlodbc just cannot seem to reset itself after a bad query and simply go dead. All subsequent queries on the same connection, legitimate or not, would fail.
PsqlOdbcBug f68-e10 EXIT SQLPrepareW with return code 0 (SQL_SUCCESS)
HSTMT 0x00033EE8
WCHAR * 0x010F0F28 [ -3] "UPDATE site SET image=image_old;\ 0"
SDWORD -3
PsqlOdbcBug f68-e10 ENTER SQLExecute
HSTMT 0x00033EE8
PsqlOdbcBug f68-e10 EXIT SQLExecute with return code -1 (SQL_ERROR)
HSTMT 0x00033EE8
DIAG [42804] ERROR: column "image" is of type bytea but expression is of type text;
Error while preparing parameters (1)
PsqlOdbcBug f68-e10 ENTER SQLFreeHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x00033EE8
PsqlOdbcBug f68-e10 EXIT SQLFreeHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x00033EE8
PsqlOdbcBug f68-e10 ENTER SQLAllocHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x000338D8
SQLHANDLE * 0x0035EB90
PsqlOdbcBug f68-e10 EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x000338D8
SQLHANDLE * 0x0035EB90 ( 0x00D51C98)
PsqlOdbcBug f68-e10 ENTER SQLPrepareW
HSTMT 0x00D51C98
WCHAR * 0x010F0DE0 [ -3] "SELECT id FROM site;\ 0"
SDWORD -3
PsqlOdbcBug f68-e10 EXIT SQLPrepareW with return code 0 (SQL_SUCCESS)
HSTMT 0x00D51C98
WCHAR * 0x010F0DE0 [ -3] "SELECT id FROM site;\ 0"
SDWORD -3
PsqlOdbcBug f68-e10 ENTER SQLExecute
HSTMT 0x00D51C98
PsqlOdbcBug f68-e10 EXIT SQLExecute with return code -1 (SQL_ERROR)
HSTMT 0x00D51C98
DIAG [08S01] Could not send Query(connection dead);
Could not send Query(connection dead) (26)
Вложения
В списке pgsql-odbc по дате отправления: