From 10bbaefe1f34820ca6a9d788a8ebe28d0468b1ff Mon Sep 17 00:00:00 2001 From: huiyu Date: Tue, 26 Apr 2022 10:07:39 +0800 Subject: [PATCH] size should be column size --- param.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/param.go b/param.go index f66d00d..53f84d8 100644 --- a/param.go +++ b/param.go @@ -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: