Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5F8D5475AE5 for ; Thu, 28 Nov 2002 01:34:44 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id DE5364759AF for ; Thu, 28 Nov 2002 01:34:42 -0500 (EST) Received: (qmail 28951 invoked from network); 28 Nov 2002 06:34:42 -0000 Received: from unknown (HELO tpf.co.jp) (126.0.1.60) by sd2.tpf-fw-c.co.jp with SMTP; 28 Nov 2002 06:34:42 -0000 Message-ID: <3DE5B961.11152905@tpf.co.jp> Date: Thu, 28 Nov 2002 15:36:17 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Han Cc: "pgsql-odbc@postgresql.org" Subject: Re: Problem about Bytea and SQL_C_CHAR References: <20021128050339.42D3F4759AF@postgresql.org> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/193 X-Sequence-Number: 2370 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/