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

Connecting Sails with SQL Server

I'm trying to set up a connection between a local SQL Server database I have set up on my computer and a sails project. I cannot get it to work to save my life, it seems there is very little documentation or I'm just not getting it. I have found…
Trevor
  • 321
  • 2
  • 7
  • 21
1
vote
1 answer

Nodejs npm mssql SQLDbType.Structured?

I am using npm mssql and I need to pass an SQLDbType.Structured parameter, is there a mapping for this type? Update: NodeJS connecting to SQL Server 2008 or later.
0
votes
0 answers

Mock node-mssql package with sinon

In my app I have a process that involves CRUD operations on a mssql database. For the connection to the db I'm using node-mssql and for establishing the connection itself I'm basically following the official documentation at…
TheDude
  • 1,205
  • 2
  • 13
  • 21
0
votes
0 answers

Node mssql package seems to drop part of query, why is this the case?

I have a Typescript application that interacts with a Microsoft SQL Server database and I am using the node mssql package to interact with it (to be precise, I am using the connection pool from a version of that package that allows for multiple…
0
votes
1 answer

Problem invoking mssql module connection in a separate files nodejs

I'm have a bad experience using mssql package which is return the connection as a promise so to be able to use a method like query I should to first wait for connection then use it something like const sql = require('mssql') const sqlConfig = { …
0
votes
0 answers

Angular mssql Connection

why this is happening, is there any solutions? ./src/polyfills.ts:53:0-14 - Error: Module not found: Error: Can't resolve 'util' in 'D:\development\development_repo\sw-pharmacy\src' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js…
Nizal Sha
  • 94
  • 9
0
votes
0 answers

Cannot understand how to use async/await to get SQL responses before continue code execution

I'm here because I don'0t understand how to wait for an SQL response, do some computation, and then send it back to the client using the http POST method. In particular, I want to query a report week by week, aggregate the response in an array and,…
0
votes
1 answer

Why is my dictionary empty when using res.send with SQL Server and express.js?

I'm using mssql with express.js. I'm trying to set the recordset results into a dictionary and then returning that dictionary using res.send but dictionary is empty. What am I doing wrong? Here's what I have tried: app.post('/api/v1/test', async…
Stoobish
  • 1,202
  • 4
  • 23
0
votes
0 answers

Connection can not be closed if the app is hosted in docker and access db via Azure Hybrid Connection

I'm building an API that using node-mssql package to connect to MSSQL, it provides connection pool functionality, so I can reuse the connection to improve performance. It works well in local env, the connection is reused, and can be closed within…
0
votes
0 answers

nodejs-mssql switching database name using username and password login

Supposed that we build nodejs with mssql (The problem is that we cannot access to different databases name in the same server from different users) Example: if we have 1000 users so will we also need 1000 connection pools?(1000 users refer to…
0
votes
1 answer

SQL Server Connections Exhausted

I do not know how to best diagnose or where to go regarding my issue, and would appreciate any help that could be offered. This question addresses the node-mssql Node.JS library. Primary Issue I am running a Node.JS application based on a Socket.IO…
Isaac K
  • 38
  • 6
0
votes
0 answers

How correctly use ConnectionPool for mssql?

How version ConnectionPool for mssql is better and why? I try understand, both work. I want a correct connection, I don't want create redundant connections. All the examples I found use .then and version A, maybe is another better option? Should I…
Aaqu
  • 165
  • 9
0
votes
1 answer

What is msnodesqlv8 to node-mssql?

What is the relationship between https://www.npmjs.com/package/msnodesqlv8 and https://www.npmjs.com/package/mssql? The documentation is confusing and I can interpret it a few different ways.
Sebastian Patten
  • 7,157
  • 4
  • 45
  • 51
0
votes
1 answer

How to pass arbitrary number of parameters to node-mssql

I have a function where a text input is split into subtexts of each 51 characters and passed to mssql to update an arbitrary number of fields like so: UPDATE some table SET EXP1 = 'inputvalue1' EXP2 = 'inputvalue2', EXP3 =…
Ergun
  • 458
  • 1
  • 8
  • 21
0
votes
1 answer

connection.queryRaw is not a function error in NodeJs WebAPI call

I am new to Nodejs. I am developing WebAPI by using NodeJs and MSSQl as database.My api is giving proper response in case of POST endpoint If it is called while server is listening through Dev environment command [npm run start]. But, If I Deploy my…