Questions tagged [tedious]

Node Module - Tedious it is used to interact with instances of Microsoft's SQL Server.

Tedious is an implementation of the TDS protocol, which is used to interact with instances of Microsoft's SQL Server.

It is intended to be a fairly slim implementation of the protocol, with not too much additional functionality.

282 questions
0
votes
2 answers

Tedious MSSQL driver, how to set transaction level to READ_COMMITTED_SNAPSHOT

Are you able to specify transaction isolation level of READ_COMMITTED_SNAPSHOT through the Tedious driver? I see the available isolation levels here: http://tediousjs.github.io/tedious/api-connection.html#function_beginTransaction But I understand…
Paulo Black
  • 310
  • 2
  • 10
0
votes
3 answers

azure sql connection timeout in tedious

connection.on('error', function (err) { console.log(err); if (err.code === 'ESOCKET') { console.log('----- Connection lost removing connection from pool -----'); // self.pool.destroy(connection); connection.close(); …
user2447562
  • 3,431
  • 2
  • 16
  • 15
0
votes
0 answers

Can't complete mysql request in nodejs

I am using the exact code (changing the local host and password exec) that I get off the mssql site https://www.npmjs.com/package/mssql. I only have one table and I just want to complete a query. var sql =…
Doopdon
  • 125
  • 2
  • 10
0
votes
2 answers

Can't connect Node.js server to Azure SQL Database

I'm running a simple Node.js server on Heroku. I've set up an Azure SQL database and I'm just trying to establish a connection to it from the server. I'm using tedious.js to connect. As far as I can tell, I'm following the patterns in the docs, but…
cweber105
  • 535
  • 1
  • 4
  • 21
0
votes
1 answer

request.on('row', function(columns) {}) never called

I connect to azure sql database by using NodeJS with Tedious. I succeed to connect, to INSERT and to SELECT. However, I cannot get columns' value when I insert a row to "user" table. Code is here: function insertUser(Name, res) { request = new…
Mitsuhiko Shimomura
  • 259
  • 1
  • 4
  • 14
0
votes
1 answer

Querying SQL NodeJS + Tedious: request.on('done', cb) not being called and nested queries

I am trying to make a request, add the returned data to an object on the cb in the "row" event on the request, and then do something in the "done" cb. Pretty simple; however, the "done" event is apparently not being triggered. Here is my current…
pbordeaux
  • 425
  • 1
  • 5
  • 18
0
votes
1 answer

Allocation failed - process out of memory error from large SQL query results

I'm using Tedious and RxJS to run a SQL query against a SQL Server and emit the results with an Observable. This function defines this behavior: export function msExecute(sql) { return new Observable(observer => { …
Nathan Jones
  • 4,904
  • 9
  • 44
  • 70
0
votes
1 answer

Node/Hapi.js - How to stream/append result set from database via hapi.js?

I'm trying to create REST service that returns data from database as a response via hapi.js. I'm using tedious to execute SQL queries and I want to format results as JSON or XML and return them as a response of hapi request. Note that this is not…
Jovan MSFT
  • 13,232
  • 4
  • 40
  • 55
0
votes
1 answer

Node/Tedious not triggering "done" event

I've started learning Node and am using Tedious to connect to and query a DB. I've written a module, db, which exports the following functions: exports.connect = function(callback) { console.log("\n** 1. open db"); db = new…
awj
  • 7,482
  • 10
  • 66
  • 120
0
votes
2 answers

No results on my request

I'm working on a small Nodejs/Express website that request a SQL Server database via Tedious. When I create my connection outside any function, it seems to work but I can't refresh. When I try to put it in my connx function nothing appends, it…
Ghorx
  • 3
  • 2
0
votes
1 answer

Tedious connect to SQL Azure

I have not had much luck with connecting to SQL Server using NTLM so far. This is my config: var config = { "userName": "username", "password": "password", "domain": "domain" "server": "server", "options": { "encrypt": true } } I…
Nam Thai
  • 841
  • 1
  • 10
  • 26
0
votes
1 answer

Browser page refresh gets a new session cookie/id

I am having this issue in my application. Whenever the browser refreshes it reassign the cookie with a new content and thus a new session id. It is the right behavior of a browser? The application uses express and connect-tedious libraries of the…
yeeen
  • 4,911
  • 11
  • 52
  • 73
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

Nodejs memory leak when running MSSQL queries

I have a script in NodeJS that runs MSSQL queries in a loop, and process each row asynchronously, but the script keeps crashing with the following error message after running for just a few seconds: Segmentation fault (core dumped) I have tried…
Seth
  • 1,353
  • 1
  • 8
  • 17
0
votes
1 answer

At what point do I return the data from this query?

I have this method for querying a database with an event on row. How do I know when all rows have been iterated through? I'm not sure when you return when all rows have been processed. The below code seems to cause issues. getData :…
ThinkNewDev
  • 668
  • 9
  • 28
1 2 3
18
19