[Haskell-cafe] hdbc-odbc adds a space to the value
Gershom Bazerman
gershomb at gmail.com
Wed Mar 23 12:30:33 CET 2011
On Mar 23, 2011, at 4:01 AM, vagif.verdi at gmail.com wrote:
> I have a weird problem ?
> When preparing sql statements with ? placeholders, hdbc-odbc adds a space to a
> string value at the end.
>
> run conn "update sometable set somefield = ? where id = ?" [SqlString "bla",
> toSql 10]
>
> Database: Ms Sql Server 2005.
> Driver: FreeTds on linux
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. John Goerzen sent a message recently explaining that HDBC needs some more eyes/contributors on it, and particularly the ODBC backend [1].
In any case, for the moment, you can always avoid bound parameters with hdbc-odbc. I've found support for them to be partial at best anyway.
Cheers,
Gershom
[1] http://www.haskell.org/pipermail/haskell-cafe/2011-February/089535.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110323/45524053/attachment.htm>
More information about the Haskell-Cafe
mailing list