Click here to Skip to main content
16,006,442 members
Home / Discussions / C#
   

C#

 
GeneralProblem is still There.... Pin
Abubakarsb7-Mar-06 22:22
Abubakarsb7-Mar-06 22:22 
AnswerRe: TextBox Array in WebApplications ??? Pin
darkelv7-Mar-06 0:48
darkelv7-Mar-06 0:48 
AnswerRe: TextBox Array in WebApplications ??? Pin
Chandana Subasinghe7-Mar-06 0:56
Chandana Subasinghe7-Mar-06 0:56 
QuestionHow to access TextBox Array in WebApplications ??? Pin
Abubakarsb6-Mar-06 23:19
Abubakarsb6-Mar-06 23:19 
QuestionHow to access TextBox Array in WebApplications ??? Pin
Abubakarsb6-Mar-06 23:17
Abubakarsb6-Mar-06 23:17 
Questionerror handling Pin
fmardani6-Mar-06 22:51
fmardani6-Mar-06 22:51 
AnswerRe: error handling Pin
albCode6-Mar-06 23:53
albCode6-Mar-06 23:53 
AnswerRe: error handling Pin
Le centriste7-Mar-06 3:02
Le centriste7-Mar-06 3:02 
It depends on the client application (ASP.NET, Console, or WinForm).

In all cases, I would build a string that explains the exception, including any property particular to the SqlException class.

When the string is ready, there are many ways to display it to the user:

ASP.NET: You may use a label.
WinForm: MessageBox
Console: Console.Error.WriteLine

Some piece of advice:

- When displaying error information, give the user the tools to fix the problem, by telling as much as possible to the user. In the case of the SqlException class, there are the Procedure, LineNumber, Number, etc. properties. There is nothing more frustrating than the "An error occured" message.
- In the Console version, notice the use of the Error StreamWriter property of the class. I do this, because the Console.WriteLine call outputs to the regular output stream.

--------

"I say no to drugs, but they don't listen."
- Marilyn Manson
QuestionHow to retrieve contacts list other Outlook user Pin
alexandrelupov6-Mar-06 22:42
alexandrelupov6-Mar-06 22:42 
QuestionDrawing in a web form Pin
Rohit Dev6-Mar-06 22:23
Rohit Dev6-Mar-06 22:23 
AnswerRe: Drawing in a web form Pin
lmoelleb6-Mar-06 23:12
lmoelleb6-Mar-06 23:12 
GeneralRe: Drawing in a web form Pin
Rohit Dev7-Mar-06 0:52
Rohit Dev7-Mar-06 0:52 
GeneralRe: Drawing in a web form Pin
lmoelleb7-Mar-06 20:54
lmoelleb7-Mar-06 20:54 
Question[Message Deleted] Pin
mitko56-Mar-06 22:22
mitko56-Mar-06 22:22 
AnswerRe: Case problem Pin
albCode6-Mar-06 22:45
albCode6-Mar-06 22:45 
GeneralRe: Case problem Pin
mitko56-Mar-06 23:10
mitko56-Mar-06 23:10 
AnswerRe: Case problem Pin
AB77716-Mar-06 22:55
AB77716-Mar-06 22:55 
GeneralRe: Case problem Pin
mitko56-Mar-06 23:16
mitko56-Mar-06 23:16 
GeneralRe: Case problem Pin
AB77716-Mar-06 23:32
AB77716-Mar-06 23:32 
AnswerRe: Case problem Pin
Guffa7-Mar-06 1:13
Guffa7-Mar-06 1:13 
QuestionSQL Server Database dump to Excel Pin
sachinkalse6-Mar-06 22:15
sachinkalse6-Mar-06 22:15 
AnswerRe: SQL Server Database dump to Excel Pin
Vasudevan Deepak Kumar6-Mar-06 22:52
Vasudevan Deepak Kumar6-Mar-06 22:52 
Question2D array list Pin
mitreviper6-Mar-06 22:09
mitreviper6-Mar-06 22:09 
AnswerRe: 2D array list Pin
AB77716-Mar-06 22:44
AB77716-Mar-06 22:44 
Questionmake a new structure type like Int32 Pin
CiNN6-Mar-06 21:09
CiNN6-Mar-06 21:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.