-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error connecting to db #62
Comments
Please, update your connection.on("error", function(err) { console.error(err.stack); }); This should print original error to the console. Could you please post the error here so I can figure out where the problem is? Thanks. |
Thanks for your help on this. var connection = new sql.Connection(config, function(err) {
// Check for errors
if (err) throw err;
// Query
var request = new sql.Request(connection) ;
request.query('select 1 as number', function (err, recordset) {
// Add error checks
if (err) throw err;
console.dir(recordset);
})
})
connection.on("error", function(err) {
console.log('Error');
console.error(err.stack);
console.log(err);
}); This^ caused this v root@ServerRoomB-Ubuntu:/node/genexpress# node app.js
Express server listening on port 3000
Error
undefined
Unrecognized token 0 at offset 204 |
I got it options: {
tdsVersion: '7_1'
} Thanks for you help! (and for your connector.) |
I'm pretty new to using MS SQL, sorry if this is obvious to others.
I'm trying to connect using this config object
most importantly I get this, and I'm lost as to what it is even after tracing it back.
The text was updated successfully, but these errors were encountered: