Skip to content

Commit

Permalink
size should be column size, to fix alexbrainman#178
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyu authored and tooilxui committed Jun 7, 2022
1 parent 9c9a2e6 commit df72402
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions param.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func (p *Parameter) BindValue(h api.SQLHSTMT, idx int, v driver.Value, conn *Con
sqltype = api.SQL_WLONGVARCHAR
case p.isDescribed:
sqltype = p.SQLType
if p.Size != 0 {
size = p.Size
}
case size <= 1:
sqltype = api.SQL_WVARCHAR
default:
Expand Down

0 comments on commit df72402

Please sign in to comment.