SqlConnection.Open() Which ErrorCodes



Hi,

I am trying to discover which SQLException.ErrorCode SqlConnection.Open()
can throw. I have until now discovered these:

// 53 : {"An error has occurred while establishing a connection to the
server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not open a
connection to SQL Server)"}
// 4060 : {"Cannot open database \"XXX\" requested by the login. The login
failed.\r\nLogin failed for user 'xx'."}
// 18456 : {"Login failed for user 'xx'."}
// 6 (SQL Server not found, or access is denied.)
// 17 (SQL Server not found, or access is denied.)
// 19 (General network error. Check your network documentation.)
// 18487 : Password expired
// 18488 : Password expired

Am I missing any?

Best regards
Henrik Skak Pedersen.


.



Relevant Pages

  • Re: How to connect a workstation to SQL Server 2005 thru ODBC?
    ... and open the port in the Windows XP ... Welcome to the Getting Started with the Database Engine tutorial. ... Connecting to the Database Engine ... Either SQL Server Management Studio or Management Studio Express. ...
    (microsoft.public.sqlserver.connect)
  • Re: Cannot connect a remote sql server
    ... I too have written quite a bit about connecting. ... Hitchhiker's Guide to Visual Studio and SQL Server ... such as the server's firewall, SQL Server's remote connection setting, ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.adonet)
  • Use Single Sign on to connect to sql server
    ... connection in an excel file that connects using an odc file connecting using ... The logon account information that you configure here must match the logon ... Name: SQL Server ... If I'm connecting using a sql username, do i need to use the domain piece ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Problem connectin SQL Server 2005
    ... Have you configured the SQL Server 2005 to allow remote connections? ... Welcome to the Getting Started with the Database Engine tutorial. ... Connecting to the Database Engine ... Configuring a Fixed Port ...
    (microsoft.public.sqlserver.connect)
  • Re: Problem connectin SQL Server 2005
    ... > Have you configured the SQL Server 2005 to allow remote connections? ... > Welcome to the Getting Started with the Database Engine tutorial. ... Connecting to the Database Engine ... > Configuring a Fixed Port ...
    (microsoft.public.sqlserver.connect)

Loading