Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Reading ex.StackTrace as a string with no control characters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred Nelson - 28 Oct 2004 02:08 GMT
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
Fred Nelson - 28 Oct 2004 02:38 GMT
Update:

The problem was with the vb.net SQL explorer.  When I used the enterprize
manager I found all my info had been written!

Very Strange - But: It Works!

Thanks to those who looked at this one for me!

Fred

> Hi:
>
[quoted text clipped - 24 lines]
>
> Fred

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.