Re: Problem about Bytea and SQL_C_CHAR - Mailing list pgsql-odbc

From Hiroshi Inoue
Subject Re: Problem about Bytea and SQL_C_CHAR
Date
Msg-id 3DE5B961.11152905@tpf.co.jp
Whole thread Raw
In response to Re: Problem about Bytea and SQL_C_CHAR  ("Han" <zhouhanok@vip.sina.com>)
List pgsql-odbc
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
tryit. 

Maybe I found a cause. Please try the snapshot dll again.
Thanks a lot.

Hiroshi Inoue
    http://w2422.nsk.ne.jp/~inoue/

pgsql-odbc by date:

Previous
From: "Han"
Date:
Subject: Re: Problem about Bytea and SQL_C_CHAR
Next
From: "Han"
Date:
Subject: Re: Problem about Bytea and SQL_C_CHAR