Insert failing for columns having zero value
Code used to insert row(values are having numeric data type in database):
db.Exec("INSERT INTO table_name (col_a, col_b) VALUES (?, ?)", 1.23, 0)
Error Received: tds: error while scanning array of bytes to numeric: tds: could not parse string . to number
Debugged further and found that num.String() in line below is returning value = . https://github.com/thda/tds/blob/1a2d89f5d5741816a6f3cfe7fd827399bf52fcf2/num.go#L202
On further debugging into num.String() function, we found that the following IsInt() check is getting failed: https://github.com/thda/tds/blob/1a2d89f5d5741816a6f3cfe7fd827399bf52fcf2/num.go#L116
Thanks for the report. I'll check it tomorrow. It should be fixed shortly.