From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Han <zhouhanok@vip.sina.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Problem about Bytea and SQL_C_CHAR
Date: Thu, 28 Nov 2002 15:36:17 +0900
Message-ID: <3DE5B961.11152905@tpf.co.jp> (raw)
References: <20021128050339.42D3F4759AF@postgresql.org>
Han wrote:
>
> Hiroshi Inoue,
>
> Hi! I checked the crashing code and abstracted this:
>
> int data=1;
> int cb;
> rc = SQLPrepare(hstmt, "insert into test1(a) values(?)", SQL_NTS);
> rc = SQLBindParameter(hstmt, 1,
> SQL_PARAM_INPUT,
> SQL_C_TCHAR, SQL_INTEGER,
> 4, 0,
> &data, MAX_STRING_SIZE,
> &cb);
> rc = SQLExecute(hstmt);
> rc = SQLFreeStmt(hstmt, SQL_RESET_PARAMS);
> rc = SQLExecDirect(hstmt, "select * from test1", SQL_NTS);
>
> Table test1 has just one int column a.
> The SQLExecDirect crashed! Replace it with SQLBindParameter after that SQLFreeStmt will lead to crash! Please try it.
Maybe I found a cause. Please try the snapshot dll again.
Thanks a lot.
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/
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: Inoue@tpf.co.jp, zhouhanok@vip.sina.com
Subject: Re: Problem about Bytea and SQL_C_CHAR
In-Reply-To: <3DE5B961.11152905@tpf.co.jp>
References: <20021128050339.42D3F4759AF@postgresql.org> <3DE5B961.11152905@tpf.co.jp>
* 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