pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: freeman <flhotel@public.xm.fj.cn>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect.
Date: Wed, 24 Dec 2003 11:36:36 +0800
Message-ID: <0HQD002IGR9ANE@mmp3.fz.fj.cn> (raw)


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






view thread (2+ messages)  latest in thread

Message-ID: <0HQD002IGR9ANE@mmp3.fz.fj.cn>
Permalink:  ../0HQD002IGR9ANE@mmp3.fz.fj.cn/
Also on:    postgresql.org/message-id/0HQD002IGR9ANE@mmp3.fz.fj.cn

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: flhotel@public.xm.fj.cn
  Subject: Re: StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect.
  In-Reply-To: <0HQD002IGR9ANE@mmp3.fz.fj.cn>
  References: <0HQD002IGR9ANE@mmp3.fz.fj.cn>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox