[Haskell-cafe] hdbc-odbc adds a space to the value

John Goerzen jgoerzen at complete.org
Wed Mar 23 21:58:52 CET 2011


On 03/23/2011 06:43 AM, Gershom Bazerman wrote:
>> I've run into that bug too. I'm pretty sure its an issue with
>> hdbc-odbc, but haven't wanted to patch it without testing it across a
>> few other configurations, which I haven't had time/found
>> straightforward to do.
>
> I should add, for those interested, where I think the bug is. In the
> bindCol method of Statement.hsc, there's the following:
>
> rc2 <- sqlBindParameter sthptr (fromIntegral icol)
> #{const SQL_PARAM_INPUT}
> #{const SQL_C_CHAR} coltype
> (if isOK rc1 then colsize else fromIntegral cslen + 1) decdigits
> csptr (fromIntegral cslen + 1) pcslen
>
> Either one or both of the "fromIntegral csLen + 1" expressions shouldn't
> have the "+ 1".

What version of HDBC-ODBC are those of you with the problem running?  I 
believe a fix for this was recently checked into my git tree.

-- John

>
> Cheers,
> Gershom
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




More information about the Haskell-Cafe mailing list