I am using Sequelize with Tedious to access SQL Server 2008.
When I do a sequelizeModel.findOne()
I get this exception -
Unhandled
I'm using select @@version
->
Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
Feb 20 2014 20:04:26
Copyright (c) Microsoft Corporation
Express Edition (64-bit) on Windows NT 6.3 (Build 17134: ) (Hypervisor)
and got this same error. sequelize.authenticate()
didn't fix it.
See also: https://github.com/tediousjs/tedious/issues/872
For me, the root cause. Basically, you need an ORDER BY for the OFFSET to make sense. @prayag answer above adds that ORDER BY.