minus5 / gofreetds

Go Sql Server database driver.
MIT License
113 stars 48 forks source link

Column type XML causes error: dbbind failed: no such column or no such conversion possible, or target buffer too small #39

Closed daliborfilus closed 7 years ago

daliborfilus commented 8 years ago

I must work with a few tables with column type defined as "XML". Trying to run conn.Exec() which selects such columns results in the following error: dbbind failed: no such column or no such conversion possible, or target buffer too small

I think the XML column type should be marked as "canvary" and that would solve the problem? When I used my fork of this repo which didn't have your (@ianic) changes mentioned in pull request #28 which limits the canvary only to SYBCHAR and SYBBINARY, it worked. So maybe adding another condition for the XML column type should be enough...

I will try to fix this (with tests) in a few hours.