node-mssql
node-mssql copied to clipboard
Parameters with type text,ntext
Creating parametrized query (ie for update) doesn't work with fields with ntext or text type. Original error message:
The text, ntext, and image data types are invalid for local variables.
how can be resolve: http://stackoverflow.com/questions/21253312/the-text-ntext-and-image-data-types-are-invalid-for-local-variables
function module.exports.declare in file lib/datatypes.js should be changed:
module.exports.declare = function(type, options) {
...
switch (type) {
case TYPES.NText: return "nvarchar (MAX)";
case TYPES.Text: return "varchar (MAX)";
...
Discussion moved to PR, closing this one.