Fix issue with byte representation in MSSQL

There is a missing cast to string in BuildUpdates which leads to a failure
to call str2ucs and ucs2str for converts on MSSQL.

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
Andrew Thornton 2021-06-26 20:42:54 +01:00
parent e323971011
commit 76d91bc218
No known key found for this signature in database
GPG Key ID: 3CDE74631F13A748
1 changed files with 6 additions and 0 deletions

View File

@ -129,6 +129,9 @@ func (statement *Statement) BuildUpdates(tableValue reflect.Value,
} }
if data != nil { if data != nil {
val = data val = data
if !col.SQLType.IsBlob() {
val = string(data)
}
} }
goto APPEND goto APPEND
} }
@ -141,6 +144,9 @@ func (statement *Statement) BuildUpdates(tableValue reflect.Value,
} }
if data != nil { if data != nil {
val = data val = data
if !col.SQLType.IsBlob() {
val = string(data)
}
} }
goto APPEND goto APPEND
} }