Solved

connection string - special char in password

Posted on 2011-09-14
4
302 Views
Last Modified: 2012-08-13
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?
0
Comment
Question by:25112
  • 3
4 Comments
 
LVL 14

Expert Comment

by:Christopher Gordon
ID: 36536702
Do you have a semicolon after the password in the connection string?
0
 
LVL 14

Expert Comment

by:Christopher Gordon
ID: 36536724
Sorry ignore my previous comment, looks like it doesn't matter.
0
 
LVL 14

Accepted Solution

by:
Christopher Gordon earned 500 total points
ID: 36536731
And to answer your question, you CAN use _ and # sign in your passwords for sql authentication.
0
 
LVL 5

Author Comment

by:25112
ID: 36536946
thanks for confirming- helps to isolate the issue.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now