Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
System.Data.SqlClient.SqlException: Cannot open database "Pubs1" requested by the login. The login failed.
Login failed for user 'sa'.
Posted

Either there is no user "sa" or you gave the wrong password.
 
Share this answer
 
Please check the username and Password, Server and Database in the connection string.

IF all is correct, please try to ping the server from the location where the connection is being openned.

if the ping response. Then try to telnet to the SQL sever port.

This will help you to analyze the problem in detail
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900