Open GillZhou opened 2 years ago
Hi GillZhou, I do not currently have a SQL server 2000 set up on hand, but I have tried your connection configuration setting, and I can connect to my local server without any problem. You could try to enable the debug options on tedious side, which can provide more details on what causes that connection problem. There is how to enable the debug option from the connection configration:
var config = {
server: '127.0.0.1',
authentication: {
type: 'default',
options: {
userName: 'sa',
password: '123456'
}
}
,options: {
port: 1433,
database: 'test',
tdsVersion:'7_1',
// you do not have to enable all of this option, you can mix and match these options under debug
debug: {
packet: true,
data: true,
payload: true,
token: true,
log: true
},
}
};
After you have added this, you also need to add an event listener to output the debug info:
connection.on('debug', function(text) {
console.log(text);
});
With this, when you run your test script, the terminal will output the details from the debug trace. In this case, we can have more information related to this issue to work with.
Also, you can try to set the encrypt to false within the connection configuration. See if that helps.
var config = {
server: '127.0.0.1',
authentication: {
type: 'default',
options: {
userName: 'sa',
password: '123456'
}
}
,options: {
// Set encrypt to false here
encrypt: false,
port: 1433,
database: 'test',
tdsVersion:'7_1',
// you do not have to enable all of this option, you can mix and match these options under debug
debug: {
packet: true,
data: true,
payload: true,
token: true,
log: true
},
}
};
TCP/IP is enabled and TCP Port 1433
SQL Server is running
SQL Server Agent is running
4.Set tdsVersion '7_1'
var connection = new Connection(config);