Tag: 很乏味

Nodejs npm mssql SQLDbType.Structured?

我正在使用npm mssql,我需要传递一个SQLDbType.Structured参数,是否有这种types的映射? 更新: 连接到SQL Server 2008或更高版本的NodeJS。

单调乏味的SQL Server TVP:parameter.value.getTime不是datetime的函数

我正在尝试使用TVP,并且在使用DateTime参数时不断收到此错误。 构build请求时的exception是: days = Math.floor((parameter.value.getTime() – UTC_EPOCH_DATE.getTime()) / (1000 * 60 * 60 * 24)); ^ 例外: TypeError:parameter.value.getTime不是一个函数 代码看起来像这样 /*declare table*/“ let table = { columns: [ { name: 'a', type: TYPES.VarChar, length: 50, nullable: true }, { name: 'b', type: TYPES.Int}, { name: 'c', type: TYPES.DateTime} ], rows: [ ['hello tvp', 777,'05/08/07 12:35 PM'], […]

Node.js MSSQL tedius ConnectionError:无法连接到本地主机:1433 – 连接ECONNREFUSED

我正尝试使用带有mssql连接接口的NodeJS连接到MSSQL 2012。 当试图连接时,我得到以下错误: { [ConnectionError: Failed to connect to localhost:1433 – connect ECONNREFUSED] name: 'ConnectionError', message: 'Failed to conncet to localhost:1433 – connect ECONNREFUSED', code: 'ESOCKET' } 有想法该怎么解决这个吗?

Node.js和Microsoft SQL Server

有什么办法可以让我的Node.js应用程序与Microsoft SQL进行通信? 我还没有看到任何MS SQL驱动程序在野外? 我把一个非常简单的应用程序放在一起,需要能够与现有的MS SQL数据库进行通信(否则我会用mongoDB或Redis)