X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D1BC6D1B439 for ; Wed, 24 Dec 2003 03:39:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 92014-03 for ; Tue, 23 Dec 2003 23:39:13 -0400 (AST) Received: from mmp3 (unknown [202.109.205.10]) by svr1.postgresql.org (Postfix) with ESMTP id 35FE8D1B47B for ; Tue, 23 Dec 2003 23:39:08 -0400 (AST) Received: from edp ([218.5.81.46]) by mmp3.fz.fj.cn (iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)) with ESMTPA id <0HQD002IER9ANE@mmp3.fz.fj.cn> for pgsql-odbc@postgresql.org; Wed, 24 Dec 2003 11:34:22 +0800 (CST) Date: Wed, 24 Dec 2003 11:36:36 +0800 From: freeman Subject: StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect. To: "pgsql-odbc@postgresql.org" Message-id: <0HQD002IGR9ANE@mmp3.fz.fj.cn> Organization: flhotel MIME-version: 1.0 X-Mailer: FoxMail 3.11 Release [cn] Content-type: text/plain; charset=GB2312 Content-transfer-encoding: 7BIT X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.4 tagged_above=0.0 required=5.0 tests=BAYES_30, RCVD_IN_RFCI, TO_ADDRESS_EQ_REAL, UPPERCASE_25_50 X-Spam-Level: * X-Archive-Number: 200312/86 X-Sequence-Number: 3624 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 = 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 --------------------------------------------------------------------------------