Hi:
I'm writing an error handling system for my vb.net windows application. I
have an error trapping routine that is catching all unexpected errors,
writing an entry in an sql database and terminating the program. This is
the best error handling for this program as its printing a bunch of form
letters and should something go wrong there is nothing the user can do to
fix it - I need to get the error message.
My problem is that I can't save the value ex.StackTrace in an SQL database
in a varchar type field.
The value displays quite nicely in a message box however there are control
characters that prevent my stored procedure from writing the values so
nothing gets written. (And I know that the class lib & stored proc work
since I can pass text such as "this is my message" and it gets written).
I have tried ex.StackTrace.tostring and I have the same problem.
I have tried stringbuilder and unfortunately it passes the control
characters to the resultant string.
Does anyone know how to convert ex.StackTract to a string with no control
characters to it can be saved in a varchar field.
Your help would be greatly appreciated!
Fred