node-tds
node-tds copied to clipboard
connect sqlserver useing node js
hello i am new to node and connecting mssql, i follow the site http://cretz.github.com/node-tds instruction, but it is not work and give error below Received error { [Error: connect ECONNREFUSED] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect' }
here is my code
var tds = require('tds'); var conn = new tds.Connection({ host: 'IT006', port: 1433, userName: 'sa', password: 'secret@PC' }) conn.connect(function(error) { if (error != null) { console.error('Received error', error); } else { console.log('Now connected, can start using'); } }); any one can help? thank you in advance