node-mssql icon indicating copy to clipboard operation
node-mssql copied to clipboard

Parameters with type text,ntext

Open dany28 opened this issue 10 years ago • 1 comments

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)"; ...

dany28 avatar Apr 19 '16 21:04 dany28

Discussion moved to PR, closing this one.

patriksimek avatar Apr 22 '16 21:04 patriksimek