Questions tagged [node-mssql]

node-mssql MSSQL database connector for Node.js.

https://tediousjs.github.io/node-mssql/

An easy-to-use MSSQL database connector for Node.js.

There are some TDS modules which offer functionality to communicate with MSSQL databases but none of them does offer enough comfort - implementation takes a lot of lines of code. This module make work as easy as it could without losing any important functionality. node-mssql uses other TDS modules as drivers and offer easy to use unified interface. It also add extra features and bug fixes.

202 questions
1
vote
1 answer

Node JS mssql/mssqlnodev8 INSERT permission denied when user is DBOwner

I'm running a pretty simple node js app that tracks user hits on a given website. The development version is working just fine writing to a SQL 2012 Enterprise Server, but the production version is getting the following error: error running query {…
1
vote
0 answers

Timeout when using "encrypt: true" for SQL Server connection using mssql module

I am using the mssql node.js module to connect with SQL Server 2005. It used to work fine when I started, with version 1.1.0 however when I upgraded today to the new version (3.3.0) it stopped working and started throwing Connection Timeout…
Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
1
vote
1 answer

How do I use Sinon to stub interaction with a database using mssql library?

Using the node-mssql library to pull data from SQL. I've been using Sinon for a while now (written about 200 tests with it); having a ton of trouble getting my head around how to stub this library out. The code looks like: var sql =…
jcollum
  • 43,623
  • 55
  • 191
  • 321
1
vote
2 answers

Node ms sql blocking code

I am trying to execute a stored procedure on a remote MS sql server from my node application using node-mssql . Problem : The call seems to be blocking and not asynchronos, since any other request to the application from another client, does not get…
Rajat banerjee
  • 1,781
  • 3
  • 17
  • 35
1
vote
1 answer

Verify certificate from SQL Server in node

I have a client whose SQL Server database I need to connect to. The FQDN of that SQL Server machine is db.client.local and they have set up a self-signed certificate / enabled encryption. If I connect to this host (adding an entry to the remote IP…
1
vote
1 answer

nodejs mssql - Too many parameters passed Stored procedure

I running into "Too many parameters passed" to stored procedure while trying to run a stored procedure in NodeJs using mssql. Code: //This computerName is what we'll find in our mssql server to see //if the server entry exist or not and the stored…
AKS
  • 16,482
  • 43
  • 166
  • 258
1
vote
1 answer

How to avoid data repetition insertion?

Recently I have posted a question, it contains some syntax error, now the code is running without error, thanks to @Arulkumar. But now I am facing one more problem, data from excel sheet is storing properly on to SQL Server database, but when I…
naik3
  • 319
  • 2
  • 8
  • 22
1
vote
2 answers

node-mssql insert returning undefined recordset

Select statements are working fine, but whenever I try an insert or update the recordset and affected values are undefined. The insert/update works in the DB, I just can't read the returned values. var sql = require('mssql'); var config =…
solydest
  • 373
  • 1
  • 3
  • 7
1
vote
0 answers

Node js read 100k records from SQL server takes long time

I am writing node js application which fetches 100 000 records from SQL server database and insert those into mysql database. I have done with code but my application not give me expected performance. My selection of 100k records takes 9-10 sec and…
Azad Shaikh
  • 61
  • 5
  • 13
1
vote
1 answer

nodejs mmsql bulk insert to temp table

I'm using mssql to connect to sql server 2012 with node.js. I've discovered the bulk insert option in the docs I'm wanting to insert data into a temporary table, which the doc says I can do. Here is what I'm…
loctrice
  • 2,454
  • 1
  • 23
  • 34
1
vote
0 answers

ENOTSUP errnoException in NodeJS using mssql in cluster worker

I am trying to connect to an SQL Server database within a cluster worker. I am using node-mssql and Tedious as the driver. Here is my test code. 'use strict'; var os = require('os'); var numCPUs = os.cpus().length; var cluster =…
hiTechToy
  • 11
  • 2
1
vote
0 answers

Handling a null fields in Node.js and mssql module

Trying to call sql server sproc from node.js using "mssql" module, when we call, it throws the error "EREQUEST", Error Details :"RequestError: Cannot insert the value NULL into column 'colName'". Don't know why but when run it on sql server it works…
1
vote
1 answer

Is SQL capable of returning nested data? If not, is there a best practice for this?

Right now I'm working with a query which outputs about 20k lines of data from table1. Node conveniently converts this to a simple JSON. So it's a huge object containing the outputted rows as smaller objects. { { // item 1 column1:…
mathaway__
  • 23
  • 3
1
vote
3 answers

Connect to localdb with sql-cli

There is the sql-cli utlity (installed with npm) which I am using to connect to various SQL Server machines. It works perfectly, however when connecting to localdb it responds with an error. So the next command line works: mssql -s…
csg
  • 2,047
  • 2
  • 22
  • 35
1
vote
1 answer

NodeJS: How to connect to MSQL database using Windows Authentication/trustedConnection from Mac

I'm building a NodeJS app on my Mac and I need to connect to a MSSQL database. Using the node module mssql, I'm able to connect to the server. But authentication fails because the database server requires the use of Windows Authorization or…
Gregir
  • 1,574
  • 5
  • 21
  • 43