minus5/gofreetds — pull request #8 by gtczap (2014-10-22 00:11:32+00:00)
Title: Support bool data type. Freetds bugfix.

Added support for bool-to-bit data type mapping. I'm not sure if this covers all cases or is only relevant for sql.

Freetds bugfix refers to a bug I am encountering that seems to be a known issue in freetds itself when using it against sql express. I am getting an error (Length or precision specification 0 is
invalid) when I try to set a non-nullable nvarchar field with an empty string. It seems the only way around this issue is to patch freetds itself, so as a workaround this fix is a hack which changes anything with varchar(0) to varchar(1) - it's ugly but it circumvents the freetds problem entirely without having to modify the actual string to contain something like a space, which others have suggested.

Rreferences:
Another person reporting same issue: http://osdir.com/ml/db.tds.freetds/2004-08/msg00022.html
Resolution to the issue was a patch to freetds: http://osdir.com/ml/db.tds.freetds/2004-08/msg00030.html