System.Data.SqlClient.SqlException: Cannot open database "database name" requested by the login. The login failed.

A short one today, this is about one of the slightly confusing error messages when it comes to connecting to SQL Server, namely:   System.Data.SqlClient.SqlException: Cannot open database “database name” requested by the login. The login failed. Login failed for user ‘the login’.    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    at…

0

System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect.

The problem: You getting are getting the following error (depending on what SQL Server Version you are running).   If you are running against Sql Server 2000:   System.Data.SqlClient.SqlException: A severe error occurred on the current command.  The results, if any, should be discarded. A severe error occurred on the current command.  The results, if…

0