Re: SqlConnection.Open() Which ErrorCodes
- From: "Henrik Skak Pedersen" <skak@xxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jun 2007 22:33:57 +0200
Hi Wen,
Thank you for your reply.
I would just like to show a decent error messsage to the user if something
goes wrong during the connection phase.
Cheers
Henrik.
"WenYuan Wang [MSFT]" <v-wywang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:eaXOOTNtHHA.2312@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Henrik,
Thanks for your waiting.
I have spend the whole day searching on internet and documents, however,
doesn't found List which included all possible error number caused by
Open()/Execute***(). I also tried with Reflector. This doesn't help...
Sorry, for my curious, would you please kindly let me know why do you want
to get such Error Number list? If you just want to write some
trouble-shooting document for your end user, I think the information in
SQLException.error is enough.
For the entire error messages, I'm afraid the only way is that querying
the
sys.messages system table for the message_id and text of SQL Server
errors.
See the error messages topic in SQL Books Online. On the client side, see
the documentation in the .NET Framework Help for these classes:
SqlConnection.Open, SqlException, and SqlErrorCollection/SqlError, which
enables you to handle server-side errors. However, there must be a lot of
work for us.
I'm sorry if you feel this isn't really helping...
But, would you please let us know what your objective is? Maybe there is
other way to approach that without the Erro Number List...
Thanks again for your patience
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: SqlConnection.Open() Which ErrorCodes
- From: William \(Bill\) Vaughn
- Re: SqlConnection.Open() Which ErrorCodes
- From: WenYuan Wang [MSFT]
- Re: SqlConnection.Open() Which ErrorCodes
- References:
- SqlConnection.Open() Which ErrorCodes
- From: Henrik Skak Pedersen
- RE: SqlConnection.Open() Which ErrorCodes
- From: WenYuan Wang [MSFT]
- Re: SqlConnection.Open() Which ErrorCodes
- From: Henrik Skak Pedersen
- Re: SqlConnection.Open() Which ErrorCodes
- From: WenYuan Wang [MSFT]
- SqlConnection.Open() Which ErrorCodes
- Prev by Date: Re: excel error
- Next by Date: Convert Access -> SQL Server 2005
- Previous by thread: Re: SqlConnection.Open() Which ErrorCodes
- Next by thread: Re: SqlConnection.Open() Which ErrorCodes
- Index(es):
Relevant Pages
|