Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 14:34
    willmorgan commented on 889cbf1
  • Jan 31 13:15
    gsamal commented on 889cbf1
  • Jan 31 13:10
    dhensby closed #797
  • Jan 31 13:10
    dhensby commented #797
  • Jan 31 13:07
    dhensby closed #795
  • Jan 31 13:07
    dhensby commented #795
  • Jan 31 12:58
    gsamal commented #789
  • Jan 31 11:50
    cesco69 opened #797
  • Jan 31 10:22

    dhensby on master

    Update changelog for v5 Merge pull request #796 from dh… (compare)

  • Jan 31 10:22
    dhensby closed #796
  • Jan 31 09:53
    dhensby commented #789
  • Jan 31 09:52
    dhensby commented #778
  • Jan 31 09:51
    dhensby review_requested #796
  • Jan 31 09:51
    dhensby opened #796
  • Jan 31 06:45
    suckerp commented #795
  • Jan 31 02:58
    liumorgan starred tediousjs/node-mssql
  • Jan 31 02:15
    zhoukk starred tediousjs/node-mssql
  • Jan 30 22:22
    vjpr edited #795
  • Jan 30 22:22
    vjpr edited #795
  • Jan 30 22:22
    vjpr opened #795
Wellington Rodriguez
@wrod7
has anyone ever ran into TimeoutError: ResourceRequest timed out? how can i fix this without having to restart the node app?
camarrone
@camarrone
hello everyone
Labs
@labs20
Hi. I'm running into ResourceRequest time out too without any plausible clue. Its random, the server is not overloaded (its a test environment). Any ideas or directions anyone? Thanks!
Wellington Rodriguez
@wrod7
i switched all my methods to prepared statements and i don’t get the error anymore. but still would like to have it reconnect when the error is thrown
Labs
@labs20
mmm... thanks for the info. I'll check on that.
But it still sounds a little off, doesn't it?
Jason Luboff
@JLuboff
I am using SQL Express for dev, and was experiencing timeouts (no real rhyme or reason). I was using a named instance. I found that if I went into SQL Server Configuration tool, Protocols section and then in the TCP/IP settings under IP Addresses changed TCP Dynamic Ports to blank and TCP Port to 1433, after restarting the service, no longer have time outs. Don't recall if this is the same type of timeouts you both are refering to...but worth looking into..
So now in my config instead of using host: 'localhost\\SQLEXPRESS' I'm using host: 'localhost'
Labs
@labs20
Thanks. Will check on that too. Right now I've upped my pool.max to 10000 and running some tests.
Labs
@labs20
having a hard time with this one.
If someone could help, apreciate. => tediousjs/node-mssql#615
sarath125
@sarath125
Hi guys I am Trying to connect sql server through window authentication for that i installed msnodesqlv8 i changed connection string according to that but i am geeting error like binaries loaded successfully. Is your node version either latest 4, 5, 6, 7, 8 or 9 ? i Tried with node version 9.5 in electron atom
John Woodruff
@johnbwoodruff
question, by default querying date columns inflates them to JavaScript Date objects. I can’t figure out, without doing a post-query map, how to get those as strings. Is there a way to specify that I want certain column types always back as a string?
Jason Luboff
@JLuboff
@jbw91 In your select statement use a Cast or Convert
John Woodruff
@johnbwoodruff
in my situation that’s not ideal, as it’s generated queries based on various criteria, and I won’t know when it’s a date column vs not to be able to cast it.
I was hoping there’d be some built in option, like is found in the pg package.
it essentially allows me to provide a parseFn for specified data types
Jason Luboff
@JLuboff
Gotcha. I've never dealt with generated queries, so can't be of much help unfortunately.
John Woodruff
@johnbwoodruff
thanks for trying! :)
Jason Luboff
@JLuboff
:+1:
iRazerXY
@iRazerXY
Hi, im having an issue:
Im trying to install and try some code with mssql, but whenever I try to run the code it gives me: "Unknown plugin "transform-runtime""
Any suggestions?
Wellington Rodriguez
@wrod7
anyone running graphql with mssql?
Sriramajeyam
@yesoreyeram

Hi all, My query looks like

select 1,2,3,4;

in results.recordset, what i was exptecting is for the object result.recordset.toTable()

{
    "columns":[
        {"name":"","nullable":false},
        {"name":"","nullable":false},
        {"name":"","nullable":false},
        {"name":"","nullable":false}
    ],"
    rows":[
        [1,2,3,4]
    ]
}

instead I am getting

{"columns":[{"name":"","nullable":false}],"rows":[[[1,2,3,4]]]}

How to overcome this? (Results are automatically grouped in to object based on column headers. in my case no column names are preset. )

sarath125
@sarath125

Hi i am using mssql nodejs package, encrypted data and NTLM login is throwing issue
(node:9988) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.Socket instead.

my Config File look like this
var config = {
"userName": "user.name",
"password": "password",
"server": "servername",
"domain": "DOMAIN_NAME_CAPITALIZED_AND_NOT_FQDM",
"options": {
"encrypt": false
}
};

Nelson Wells
@nelsonwellswku
does anyone have any experience using transactions with promises or async await? i'm calling trans.rollback() but it doesn't seem to actually perform the rollback and I'm at a loss why
Nelson Wells
@nelsonwellswku
I figured it out. You can't use connection.request(transaction) if your transaction was made with a different connection. derp.
Dai Nguyendo
@dainguyendo
Greetings, wondering if anyone has had experiences with using bulk requests and inserting geometry type data? I have a pretty simple scenario but specifically introduction a geometry column results in this error TypeError: "value" argument is out of bounds at checkInt (buffer.js:1041:11) at Buffer.writeUInt16LE (buffer.js:1099:5) at WritableTrackingBuffer.writeUInt16LE (/var/task/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.js:87:19) at WritableTrackingBuffer.writeUsVarbyte (/var/task/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.js:243:12) at Object.writeParameterData (/var/task/node_modules/tedious/lib/data-type.js:864:25) at BulkLoad.addRow (/var/task/node_modules/tedious/lib/bulk-load.js:141:17) at parent.acquire (/var/task/node_modules/mssql/lib/tedious.js:473:16) at _acquire.then.connection (/var/task/node_modules/mssql/lib/base.js:172:42) at process._tickDomainCallback (internal/process/next_tick.js:135:7)
Chris Rutherford
@cjrutherford
Hey everyone, I was wondering, is it possible to change the database being connected to in a connection pool?
I mean after using it once. Or should I create new pools for each DB I'm connecting to?
David Gasperoni
@mcdado
FWIW I do create new pools. Couldn’t manage to change db.
Chris Rutherford
@cjrutherford
it's okay, I just didn't specify a database, and used unambiguous table names to get the right DB. i.e: select * from [database].[dbo].[tableName]
rdking
@rdking
Hi all. I'm trying to figure out how to receive the 'row' event from a query run against a Request object. The code looks like this:
this[data] = await new Promise((resolve, reject) => {
    var request = new sql.Request(this[db]);
    var query = queries.getErrors;

    //get the records for the block #blockNo
    request.on('row', (row) => {
        console.log(`Got row!`);
    });
    request.query(query, (err, result) => {
        if (err) {
            console.error(`An error occurred while processing the request: \n${err}`);
            reject(err);
        }
        else {
            console.info(`Received ${result.recordset.length} records.`);
            resolve(result.recordset);
        }
    });
}) || [];
Problem is that even though I get 500+ records back, the row event never fires. Any suggestions?
rdking
@rdking
nvmd, just needed to turn on streaming...
Thomas Beckley
@teb951999
Hey! Does anyone knwo how to simply open a connection async, make a request async and close eonnction
I don't want to deal with calbacks
David Gasperoni
@mcdado
@teb951999 if you want to do async you either use callbacks or promises
I’m afraid
Maybe await / async by you need a recent version of Node, and personally I never used it
Chris Rutherford
@cjrutherford
I'm trying to pull in data from five different databases, and it looks like everything is coming through, but I can't continue because of this trace stack... I'm not sure where the unhandled promise rejection is located. Is it in my code? here's the call stack:
(node:18908) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
warning.js:18
    at Function.all (<anonymous>)
    at c:\Users\rutherfordc\Documents\GitHub\migration-plus\index.js:10:11
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:18908) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
warning.js:18
(node:18908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
warning.js:18
(node:18908) UnhandledPromiseRejectionWarning: ReferenceError: results is not defined
warning.js:18
    at c:\Users\rutherfordc\Documents\GitHub\migration-plus\index.js:15:11
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:18908) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Jason Luboff
@JLuboff
@cjrutherford Do you have this bit Symbol(Symbol.iterator) some where in your code? Or in a query?
Chris Rutherford
@cjrutherford
Sorry I found out it was because I was using Promise.all() with an object instead of an array..... sorry
Jason Luboff
@JLuboff
All good, I may not have even had the answer but still try to help :smile:
vijaylakkavaram
@vijaylakkavaram
hi every one
can any one tell me how to do transcations in node js for mssql?
to write transactional queries in node for mssql queries?/
help me
David Gasperoni
@mcdado
I think you just write them in the SQL queries? You just need to make sure you use the same connection for transaction
Sorry I yet never written a transaction
Jason Luboff
@JLuboff
@vijaylakkavaram The docs explain how to use a transaction https://www.npmjs.com/package/mssql#transaction