J.dd
J.dd

Reputation: 157

connect to mssql with password that containts @

I am using nodes mssql module in order to connect to mssql database. However my password contains @ and the pattern to the connection is

mssql://username:password@localhost/database

It throws connection error. I assume it is because it sees @ so content after it it takes as localhost and so on.

Is there a way how to connect there with password that contains @?

Thanks

Upvotes: 0

Views: 465

Answers (1)

TheGameiswar
TheGameiswar

Reputation: 28900

From MSDN:

certain symbols must be enclosed by double quotation marks (") or square brackets ([ ]).

Use these delimiters in Transact-SQL statements when the SQL Server login, user, role, or password has the following characteristics:

1.Contains or starts with a space character.
2. Starts with the $ or @ character.

Upvotes: 1

Related Questions