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
0
votes
1 answer

Unable to use Table-Valued Parameter (TVP) in query (node.js & node-mssql)

Good day, I am attempting to export some data from SQL, store it and later compare that data to the result of the same query. The simplest way I can see to do this is using TVP however it doesn't seem to work on node-mssql and it doesn't give me a…
KaoSDlanor
  • 65
  • 7
0
votes
0 answers

Getting Logon failed for login 'sa' due to trigger execution. in nodejs app using mssql

I am trying to connect to a remote database using below code in node js and getting "Logon failed for login 'sa' due to trigger execution." error. // Database connection var sql = require('mssql'); // Change the config settings to match…
Jitendra Pancholi
  • 7,897
  • 12
  • 51
  • 84
0
votes
1 answer

Connection Error in mssql node module

I am using mssql node module in my project, All are good till the time I am not make any async call. On the multiple async call its start give me connection error "Connection is closed". can someone look into the code and help me out. ====…
Ashish Yadav
  • 99
  • 3
  • 5
0
votes
2 answers

Handle Duplicate insertion node js

What is the best way to handle duplicate insertion? Either we should check before insertion if item already exist then notify user for duplicate entry or we can handle error message and let user know that its a duplicate entry. Using first approach…
Siraj ul Haq
  • 845
  • 9
  • 25
0
votes
1 answer

Buffer format for user-defined table types

I'm wanting to call a SQL Server stored procedure using node.js with the mssql + tedious module. One of the parameters I need to pass in is of a user-defined table type. I have a UDT parameter type available in this library which takes a Buffer for…
Jacob
  • 77,566
  • 24
  • 149
  • 228
0
votes
1 answer

How to return value from a series of cascading async code

I need some advice on how to re/write the db specific cascading code (callback) so that I can effectively return a value to the underlying if/else. I am using restify and the db lib is node-mssql (tedious). function authenticate(req, res, next) { …
schliden
  • 13
  • 3
0
votes
1 answer

encoding and save images

I am a beginner with node.js and I would ask you for advice. Using a selection from the database I get the required data (ID, building, floor, map). The map is stored in jpg format as a byte array 0x89504E470D0A1A0A0000000D4948... . I save to a new…
user3468921
  • 561
  • 2
  • 8
  • 26
0
votes
2 answers

Save empty string in table

I got a website with a form full of settings where each of the inputs save a value in a MS SQL Database. But when i set a field to '' i got the following error message: "The incoming tabular data stream (TDS) remote procedure call (RPC) protocol…
Michael Malura
  • 1,131
  • 2
  • 13
  • 30
0
votes
0 answers

connect to sql server 2012 with node.js

I want to connect a sql db with node, so i find this npm package https://www.npmjs.com/package/mssql I'am looking forward to create a simple authentication so for a start i just want to connect to the sql db, so my problem is when i tried to execute…
abderrahmen
  • 351
  • 1
  • 3
  • 14
0
votes
0 answers

Cache in execution of stored procedure express

I am facing problems while execution of multiple stored procedures using npm-mssql package in expressJS. Currently i have used SingleTon Design pattern for DB configuration and assigned the connection to an global variable called _config Well to…
0
votes
0 answers

Deploy Node.js on Azure Website error (msnodesql driver)

I want to deploy my node.js on azure website but it always error it shows that error about install "msnodesql" but I only use "mssql" with default driver "tedious" how to solve this problem? Command:…
Eric
  • 1
  • 1
0
votes
0 answers

Logon failed for login 'username' due to trigger execution with node-mssql

I'm using node-mssql with tedious as the driver (default one) for connecting to mssql server. I have no problem connecting to a dev server when when connecting to one of the production server, i got this error Logon failed for login 'username' due…
Tuan Anh Tran
  • 6,807
  • 6
  • 37
  • 54
0
votes
2 answers

node.js mssql - can't get simple sample to work

I am trying to run the simplest hello world with Node.js and the mssql package. https://www.npmjs.org/package/mssql I create a new folder, with an empty JS file (app.js) I copy and paste the sample from the mssql package page to the js file. I only…
itaysk
  • 5,852
  • 2
  • 33
  • 40
0
votes
1 answer

How do I render return values of a node-mssql statement with Jade?

I've got a Node.js server with Express and Jade running. On an HTTP request the server will execute the following function: function home(req, res) { res.render("site/index", {recordset: recordset}); //render the Jade template } Now I would…
Conor
  • 553
  • 1
  • 7
  • 20
0
votes
2 answers

Using node-sqlserver or node-mssql under Azure

I'm trying to connect to a database on Azure using node-mssql. My development system is Windows 7 and I have had no success at all getting node-sqlserver to install via WebMatrix. My question is two part: Firstly is there any reason that even when…
user3358344
  • 193
  • 1
  • 9
1 2 3
13
14