I am using npm mssql and I need to pass an SQLDbType.Structured parameter, is there a mapping for this type?
Update:
NodeJS connecting to SQL Server 2008 or later.
I am using npm mssql and I need to pass an SQLDbType.Structured parameter, is there a mapping for this type?
Update:
NodeJS connecting to SQL Server 2008 or later.
Table value parameters was added both to tedious and mssql recently.
Here is the documentation on how to do it from node-mssql (added to version ^0.5.1):
var tvp = new sql.Table()
// Columns must correspond with type we have created in database.
tvp.columns.add('a', sql.VarChar(50));
tvp.columns.add('b', sql.Int);
// Add rows
tvp.rows.add('hello tvp', 777); // Values are in same order as columns.