Dont connect with selected port
My connection try always start in the default port 1433 instead of the choosen port. This is my config object:
{
"server": "random.imcloud.cl",
"port":"8003" ,
"database":"DATABASE_NAME",
"user":"USERNAME",
"password":"*************",
"options":{"tdsVersion":"7_1",
"encrypt":true}
}
My response with this say: "ConnectionError: Failed to connect to random.imcloud.cl:1433 IN 15000ms"
In my case i can specify port, unless i'm trying to connect to a specific instance. For example :
{ "server": "localhost\SQLEXPRESS", "port" : "1433", "user": "USERNAME", "password": "*************", "database": "DATABASE_NAME" }
Also tried this one (as specified in Tedious configuration options https://www.npmjs.com/package/mssql#tedious):
{ "server": "localhost", "port" : "1433", "user": "USERNAME", "password": ""*************",", "database": "DATABASE",
"options": { "instanceName": "SQLEXPRESS" } }
Both results saying : "Failed to connect to localhost:undefined in 15000ms" So I think both issues may be related.
Are you sure that TCP connections are enabled in SQL, and that windows firewall isn't blocking the connections? can you telnet/netcat to the system in question on the port in question?
Maybe that its the problem, thank you
in my case I cannot specify a port when using
options: { encrypt: true }
Closing due to inactivity.