node-tds icon indicating copy to clipboard operation
node-tds copied to clipboard

connect sqlserver useing node js

Open veasna234 opened this issue 12 years ago • 0 comments

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

veasna234 avatar Feb 11 '14 05:02 veasna234