[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: back-sql writes binding improperly



Brad Midgley wrote:

hey

i can't sleep and i eventually found an invocation of SQLBindParameter that works. is this a bug somewhere in the odbc stuff? without this change, we get an empty string every time out of the binding. with the change, the value makes it in properly. argh.

diff -u -r1.8 add.c
--- add.c 25 Aug 2004 08:41:13 -0000 1.8
+++ add.c 25 Sep 2004 07:17:10 -0000
@@ -416,7 +416,7 @@
SQLBindParameter( sth, pno + 2 - po,
SQL_PARAM_INPUT,
SQL_C_CHAR, SQL_CHAR,
- 0, 0, at_val->bv_val,
+ at_val->bv_len, 0, at_val->bv_val,
at_val->bv_len, 0 );

I see your point, and I don't have any objection to applying your fix; it's now in HEAD code. I note that it appears that your RDBMS requires the column size to be set when values of SQL_CHAR type are used.




SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497