connection string - special char in password

the connection string
server=POSDET2;database=SAETPrep;UID=saetprep;PWD=SAET_PrepUser#3
but the app fails like the below..
Cannot open database "SAETPrep" requested by the login. The login failed.
Login failed for user 'saetprep'.

but in ssms, i see that i am able to login with the above credentials..

i see the password as _ and #.. could they be problematic?
LVL 5
25112Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Christopher GordonConnect With a Mentor Senior Developer AnalystCommented:
And to answer your question, you CAN use _ and # sign in your passwords for sql authentication.
0
 
Christopher GordonSenior Developer AnalystCommented:
Do you have a semicolon after the password in the connection string?
0
 
Christopher GordonSenior Developer AnalystCommented:
Sorry ignore my previous comment, looks like it doesn't matter.
0
 
25112Author Commented:
thanks for confirming- helps to isolate the issue.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.