tedious: TypeError: Cannot read property 'hasPrecision'

I was getting this error using the mssql module so I switched to just tedious code, and I am getting the same error using minimal.js. I am guessing that there is a SQL Server setting that I need here. My DB is SQL Server 12.0.4422. I just upgraded node to v4.4.3 and upgraded all packages.

The query produces 10 records. Using mssql, it just bombs. Using the minimal.js code, it bombs after the first record is written to console.

Thanks!

c:\Users\hallrogera\Documents\Projects\workbench\node_modules\mssql\node_modules
\tedious\lib\metadata-parser.js:45
  if (type.hasPrecision) {
          ^

TypeError: Cannot read property 'hasPrecision' of undefined
    at readPrecision (c:\Users\hallrogera\Documents\Projects\workbench\node_modu
les\mssql\node_modules\tedious\lib\metadata-parser.js:45:11)
    at c:\Users\hallrogera\Documents\Projects\workbench\node_modules\mssql\node_
modules\tedious\lib\value-parser.js:348:22
    at c:\Users\hallrogera\Documents\Projects\workbench\node_modules\mssql\node_
modules\tedious\lib\token\stream-parser.js:147:9
    at Parser.awaitData (c:\Users\hallrogera\Documents\Projects\workbench\node_m
odules\mssql\node_modules\tedious\lib\token\stream-parser.js:121:9)
    at Parser.readUInt8 (c:\Users\hallrogera\Documents\Projects\workbench\node_m
odules\mssql\node_modules\tedious\lib\token\stream-parser.js:144:12)
    at c:\Users\hallrogera\Documents\Projects\workbench\node_modules\mssql\node_
modules\tedious\lib\value-parser.js:345:27
    at c:\Users\hallrogera\Documents\Projects\workbench\node_modules\mssql\node_
modules\tedious\lib\token\stream-parser.js:147:9
    at Parser.awaitData (c:\Users\hallrogera\Documents\Projects\workbench\node_m
odules\mssql\node_modules\tedious\lib\token\stream-parser.js:121:9)
    at Parser.readUInt8 (c:\Users\hallrogera\Documents\Projects\workbench\node_m
odules\mssql\node_modules\tedious\lib\token\stream-parser.js:144:12)
    at c:\Users\hallrogera\Documents\Projects\workbench\node_modules\mssql\node_
modules\tedious\lib\value-parser.js:344:25

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

I reformatted your posts for you, but in the future, please use proper markdown so the code is actually readable. If you’re not familiar, see https://guides.github.com/features/mastering-markdown/

Actually the support was added in 1.14 (PR). I need to figure out which value causes this exception.