Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

connection string - special char in password

Posted on 2011-09-14
4
Medium Priority
?
320 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
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.

972 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