tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.23k stars 467 forks source link

Connection strings formatted like "Data source=address\instance,port..." are not parsed correctly #1519

Closed mondegreengames closed 1 year ago

mondegreengames commented 1 year ago

The code that parses the connection strings seems to correctly parse

Data source=address,port

and

Data source=address\instance

and

Data source=address,port\instance

but not

Data source=address\instance,port

which is a valid format when using ADO.NET. But when using mssql to connect using this format the port is always left as the default 1433.

mondegreengames commented 1 year ago

OTOH, this may be moot since Tedious ignores the port when instance name is given anyway.

dhensby commented 1 year ago

Yes, I was going to make that point.

However this needs to be raised with the connection string lib. Let me see if I can move the issue...

adams-family commented 1 year ago

+1

dhensby commented 1 year ago

However this needs to be raised with the connection string lib. Let me see if I can move the issue...

Ok - so this isn't an issue with the connection-string library. The connection-string library parses the value out fine, it's for the mssql lib to interpret it and provide the ports, etc to the underlying driver.