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

Sql time(7) field not storing in DB from node js

I am using nodemssql package for sql server azure Field time(7) > RecurrenceType.columns.add('StartTime', mssql.Time(7)); > RecurrenceType.columns.add('EndTime', mssql.Time(7)); Values Start time : '01:01' End time : '13:01' stored in…
Furqan Misarwala
  • 1,743
  • 6
  • 26
  • 53
0
votes
0 answers

Query with parameter in Node js return null record set

I have this query in Node JS with MSSQL driver for sql server: public getDataParameterFirst(SerialNumber, Sid, OreDa, OreA, MinutiDa, MinutiA) { return runDb(cnn => cnn.query `SELECT * FROM activeTelemetry.tbl_EHStage WHERE SerialNumber =…
0
votes
1 answer

JS - Unhandled promise

I created a node.js web application. Currently I'm using MSSQL for the DB. I added the node-mssql package. I created functions, in a separate file called sql.js, to perform the corresponding SQL functions. The controller.js calls them with the await…
AJ_
  • 3,787
  • 10
  • 47
  • 82
0
votes
1 answer

Import CSV rows with 2000 records from node into SQL Server

I am using exceljs (https://www.npmjs.com/package/exceljs) node package to read excel file. I am looking for fast import csv with 2000 records into SQL Server. Table: User [Id PK] Role [UserId FK] Unit [UserId FK] Excel file: UserName Role Unit…
Furqan Misarwala
  • 1,743
  • 6
  • 26
  • 53
0
votes
1 answer

node-mssql cannot read property length of undefined from dbconfig user name

hello i'm looking for some help with this problem i'm working on rest api for my db got this problem var bufferLength = 64 + domain.length * 2 + username.length * 2 + lm v2len + ntlmv2len + 8 + 8 + 8 + 4 + server_data.length + 4; TypeError:…
Vladimir Zaguzin
  • 191
  • 5
  • 22
0
votes
1 answer

Query Azure SQL Database from Google App Engine (NodeJs)

I'm using node-mssql on Google App Engine to query a Sql Database hosted on Azure. The issue I'm having is that the App Engine Node Server constantly changes IP addresses. So, I'd have have to white list every possible (I don't know how many that…
mrshickadance
  • 1,213
  • 4
  • 20
  • 34
0
votes
1 answer

NodeJS Issue with huge data export

I have a scenario. In DB, I have a table with a huge amount of records (2 million) and I need to export them to xlsx or csv. So the basic approach that I used, is running a query against DB and put the data into an appropriate file to…
Gautam Kumar Samal
  • 758
  • 1
  • 7
  • 23
0
votes
0 answers

iisnode on azure not handling as much traffic as local

I have a nodejs webapp on azure, that I can test the code locally at 50 rps with 100 concurrent users for 10 minutes, and I receive zero errors. And each of those requests is calling the db and writing. However when deployed on Azure, I constantly…
0
votes
1 answer

SQL Server : Create Procedure in DB without using [GO]

I want to execute this (simplified) query using node-mssql that executes in SQL Server 2017 fine: USE [Journal] [GO] CREATE PROCEDURE [dbo].[EventDelete] @NotificationID INT AS DELETE Notification WHERE NotificationID =…
Tobin
  • 1,698
  • 15
  • 24
0
votes
1 answer

Node : how to convert from varbinary to image of SQL Server datatype

I'm have a SQL Server database with images of type varbinary. I need to convert the varbinary and return the image to a web page. Help would be appreciated. I found this and it was very helpful, but I need it in reverse. Node.js How to convert to…
theTechGrandma
  • 103
  • 1
  • 13
0
votes
3 answers

HTML is being sent instead of JSON Data

I'm trying to retrieve data from a SQL database and display that said data on a Reactjs web app. However, all the calls I make to the database results in the HTML of the webpage in focus. I have set the headers, and I've tried to change the way the…
Andy Wong
  • 73
  • 2
  • 12
0
votes
2 answers

Need to keep promise result in a variable for Nodejs mssql validation

let RetrieveFromDb=(queryStr) => { let sql=require('mssql'); let config={ server:'127.0.0.1', database:'TestDB', user:'user', password:'user', }; let dbConn=new sql.Connection(config); return…
Rocky
  • 857
  • 2
  • 8
  • 15
0
votes
1 answer

Main connection with node-mssql

I'm using node module "node-mssql" to connect a SQL Server. I'm creating a bluebird promise and at the end this promise closes the connection. I did it because I don't know how to make a main connection, but I don't think opening/closing a…
0
votes
2 answers

node-mssql multiple prepared statements with single connection

I'm banging my head against this library. I tried to setup a singleton intermediary class that would start the start the connection and then share that connection via static methods. My problem is that I'm having difficulties to setup things so that…
mcdado
  • 718
  • 1
  • 8
  • 15
0
votes
0 answers

function not recognized while using node-mssql module of node.js

I'm using module node-mssql(0.0.1 the latest version) to access SQL server. I want to use "select top x * from xxxx" so I use codes like: var queryObj = new node_mssql.Query({ host: 'x.x.x.x', port: 1433, username: 'xx', password: 'xxx', …
jones321
  • 55
  • 1
  • 10