StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect.

From: freeman <flhotel(at)public(dot)xm(dot)fj(dot)cn>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect.
Date: 2003-12-24 03:36:36
Message-ID: 0HQD002IGR9ANE@mmp3.fz.fj.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


SERVER: MANDRIKE 8.1+POSTGRESQL 7.4
CLENT : PWIN98+PSQLODBC7.03.02
TEST TOOL: ODBC TEST

If ODBCVER <>3.0 , StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect.

EXAMPLE 1: (ERROR? StatementHandle will be free automatically after SQLExecdirect )
----------------------------------------------------------------------------
Full Connect(Default)

Successfully connected to DSN 'PostgreSQL30'.
SQLExecDirect:
In: hstmt = 0x00C00748,
szSqlStr = "DELETE FROM GUEST WHERE 1=2", cbSqlStr = -3
Return: SQL_NO_DATA_FOUND=100
SQLNumResultCols:
In: StatementHandle = 0x00C00748, ColumnCountPtr = 0x004B85E0
Return: SQL_ERROR=-1
Out: *ColumnCountPtr = <unmodified>
stmt: szSqlState = "S1010", *pfNativeError = 0, *pcbErrorMsg = 56
szErrorMsg = "[Microsoft][ODBC Driver Manager] Function sequence error"
------------------------------------------------------------------------------

EXAMPLE 2: (OK)
-------------------------------------------------------------------------------
Full Connect(Default)

Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3

Successfully connected to DSN 'PostgreSQL30'.
SQLExecDirect:
In: hstmt = 0x00C00748,
szSqlStr = "DELETE FROM GUEST WHERE 1=2", cbSqlStr = -3
Return: SQL_NO_DATA_FOUND=100
SQLNumResultCols:
In: StatementHandle = 0x00C00748, ColumnCountPtr = 0x004B85E0
Return: SQL_SUCCESS=0
Out: *ColumnCountPtr = 0
--------------------------------------------------------------------------------

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Stephen Powell 2003-12-24 03:50:30 Re: add some word in select
Previous Message Robert John Shepherd 2003-12-23 22:07:48 Re: Hiroshi leaves the psqlodc driver ?