node-mssql

Node.js and Microsoft SQL Server

北慕城南 提交于 2019-11-27 17:04:37
Is there any way I can get my Node.js app to communicate with Microsoft SQL? I haven't seen any MS SQL drivers out there in the wild? I'm putting a very simple app together and need to be able to communicate with an existing MS SQL database (otherwise I would have gone with mongoDB or Redis) kop48 We just released preview drivers for Node.JS for SQL Server connectivity. You can find them here: http://blogs.msdn.com/b/sqlphp/archive/2012/06/08/introducing-the-microsoft-driver-for-node-js-for-sql-server.aspx The original question is old and now using node-mssql as answered by @Patrik Šimek that

Node.js and Microsoft SQL Server

狂风中的少年 提交于 2019-11-27 04:10:46
问题 Is there any way I can get my Node.js app to communicate with Microsoft SQL? I haven't seen any MS SQL drivers out there in the wild? I'm putting a very simple app together and need to be able to communicate with an existing MS SQL database (otherwise I would have gone with mongoDB or Redis) 回答1: We just released preview drivers for Node.JS for SQL Server connectivity. You can find them here: http://blogs.msdn.com/b/sqlphp/archive/2012/06/08/introducing-the-microsoft-driver-for-node-js-for

Connecting to a remote Microsoft SQL server from Node.js

安稳与你 提交于 2019-11-27 02:10:17
问题 I was wondering if anyone was aware of a way to connect to a Microsoft SQL database from Node.js. I'm aware of the MySQL drivers, but I have data that I need to pull from a MS SQL database and would rather pull directly from Node.js rather than hack a PHP script of some sort in place. 回答1: I suspect you'll have to wrap your SQL Server with a JSON outputting web-service. On the positive side, it should be relatively easy to do. Be nice if the JavaScript engine in node.js could do this: (from

Node.js MSSQL tedius ConnectionError: Failed to connect to localhost:1433 - connect ECONNREFUSED

佐手、 提交于 2019-11-27 01:44:37
问题 I am trying to connect to MSSQL 2012 using NodeJS with the mssql connection interface. When attempting to connect I get the following error: { [ConnectionError: Failed to connect to localhost:1433 - connect ECONNREFUSED] name: 'ConnectionError', message: 'Failed to conncet to localhost:1433 - connect ECONNREFUSED', code: 'ESOCKET' } Any ideas on how to fix this? 回答1: The solution is to enable TCP connections which are disabled by default. 回答2: My case wasn't exactly the same as Matt's, but

How can I use a single mssql connection pool across several routes in an Express 4 web application?

烂漫一生 提交于 2019-11-26 22:00:21
I want to use node-mssql as a MSSQL database connector in a Node JS Express 4 web application. Route handler logic is handled in separate files. How do I create a single/global connection pool and use it across several files where route logic is handled? I don't want to make a new connection pool in each route handler function/file. It's been 3 years since I asked and answered the question. Since then a few things have changed. Here's the new solution based on ES6, mssql 4 and Express 4 that I would suggest today. Two key elements are at play here. Modules are cached after the first time they

How can I use a single mssql connection pool across several routes in an Express 4 web application?

て烟熏妆下的殇ゞ 提交于 2019-11-26 08:08:53
问题 I want to use node-mssql as a MSSQL database connector in a Node JS Express 4 web application. Route handler logic is handled in separate files. How do I create a single/global connection pool and use it across several files where route logic is handled? I don\'t want to make a new connection pool in each route handler function/file. 回答1: It's been 3 years since I asked and answered the question. Since then a few things have changed. Here's the new solution based on ES6, mssql 4 and Express 4