You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/tedious/request.js
+55-25Lines changed: 55 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -200,9 +200,13 @@ const parameterCorrection = function (value) {
200
200
}
201
201
202
202
for(constcolofvalue.columns){
203
+
consttediousType=getTediousType(col.type)
204
+
if(tediousType===tds.TYPES.Variant){
205
+
thrownewRequestError(`Column '${col.name}' in TVP '${value.schema ? value.schema+'.' : ''}${value.name}' uses sql_variant which is not supported by the tedious driver for TVP column types. Consider using a more specific data type.`,'EARGS')
206
+
}
203
207
tvp.columns.push({
204
208
name: col.name,
205
-
type: getTediousType(col.type),
209
+
type: tediousType,
206
210
length: col.length,
207
211
scale: col.scale,
208
212
precision: col.precision
@@ -664,9 +668,18 @@ class Request extends BaseRequest {
664
668
}catch(e){
665
669
e.message=`Validation failed for parameter '${name}'. ${e.message}`
0 commit comments