Host crashes when using tedious to connect to a database.
See original GitHub issuePlease provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem
- Create a node http function
index.js
var Connection = require('tedious').Connection;
var config = {
userName: 'username',
password: 'PASSWORD',
server: 'server.database.windows.net',
options: {encrypt: true, database: 'AdventureWorks'}
};
module.exports = function(context, req, saasSql) {
var connection = new Connection(config);
connection.on('connect', function(err) {
if(err) {
context.log(err);
} else {
context.log("Connected");
context.res = {
body: 'Connected'
};
}
context.done();
});
};
package.json
{
"dependencies": {
"tedious": "*"
}
}
function.json
{
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req"
},
{
"type": "http",
"direction": "out",
"name": "res"
}
],
"disabled": false
}
- Hit run
Expected behavior
Error maybe, I don’t know
Actual behavior
w3wp.exe crashes
Known workarounds
none
Related information
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
node.js tedious ConnectionError: Failed to connect ...
I have found the problem with my code... it was because I had a throw exception in the callback error for swmssqlc.connect() which...
Read more >Mysql Workbench crashing when connecting
Go to Database -> Manage Connections · New -> Enter the connection details · Click test connection. · If credentials are OK and...
Read more >MySQL crashes when connecting from localhost with tcp ...
I have Ubuntu 12.04 running MySQL server 5.5.24. I can connect with mysql --user root -p . status shows me : ... Connection:...
Read more >node-mssql | Microsoft SQL Server client for Node.js
Short Example: Use Connect String. const sql = require('mssql') async () => { try { // make sure that any items are correctly...
Read more >Getting started | Tedious
The arguments to the Connection constructor are host, username, password, an options object (empty in this example), and a callback function. Tedious will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mamaso just remove the .js from the link
The syntax has changed for config section. See [Query Azure SQL from Node](https://stackoverflow.com_ Config now looks like: