SqlConnection.Open() Which ErrorCodes
- From: "Henrik Skak Pedersen" <skak@xxxxxxxxxxxxxxxx>
- Date: Wed, 20 Jun 2007 16:03:36 +0200
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.
.
- Follow-Ups:
- RE: SqlConnection.Open() Which ErrorCodes
- From: WenYuan Wang [MSFT]
- RE: SqlConnection.Open() Which ErrorCodes
- From: WenYuan Wang [MSFT]
- RE: SqlConnection.Open() Which ErrorCodes
- Prev by Date: RE: SQL Server 2005/.NET 2.0 - Application performance deteriorates!
- Next by Date: Re: Common Practice to Connect SQL
- Previous by thread: Behavior of close application during dataGrid modification
- Next by thread: RE: SqlConnection.Open() Which ErrorCodes
- Index(es):
Relevant Pages
|
Loading