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

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
rowaffect. 

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
--------------------------------------------------------------------------------




Re: StatementHandle will be free automatically after you excute a

From
Hiroshi Inoue
Date:
freeman wrote:
>
> 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
rowaffect. 

Could you try the dll at
    http://www.geocities.jp/inocchichichi/psqlodbc/ ?

reagrds,
Hiroshi Inoue