Solved

connection string - special char in password

Posted on 2011-09-14
4
304 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

862 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

25 Experts available now in Live!

Get 1:1 Help Now