-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "config.server" property is required and must be of type string #1230
Comments
Can confirm, i have the same issue with v7.0.0, while with v6.2.0 it works fine. |
Ok - this is probably because the new connection string parser doesn't parse these uri format strings. I'll take a look and update the readme/changelog for now |
Oh - and to note, the library still has the old connection string parser logic in it (it's just not used) so you can use it to parse your own connection string and then give the resolved config object to the library. I plan on removing it for v8, though. |
I am seeing the same issue. I also noticed that the aforementioned exception from tedious ("The config.server property is required...") is not caught: From connection-pool.js:
tdc.Connection() can throw, should be wrapped in a try-catch, with a call to rejectOnce() inside the catch. |
Where is the documentation for the new string format of connection string? (ex. useUTC=false...) |
There is no new format; simply use a standard connection string for SQL server. You can see how the connection string values are handled here: https://github.com/tediousjs/node-mssql/blob/v7.2.0/lib/base/connection-pool.js#L92-L273 |
in case you encounter this instead of: use |
Note: the types only match config as an object and not a type here https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mssql/index.d.ts#L396-L399 |
It would be nice to be able to specify |
I am trying to connect to ms sql using below code but I am getting error.
Expected behaviour:
Should be able to connect
Actual behaviour:
Software versions
The text was updated successfully, but these errors were encountered: