Solved

How to trap for format errors in vb.net

Posted on 2004-09-22
3
141 Views
Last Modified: 2010-04-23
I am writing data to a table.  Intermittently I will get a format error.  I can click ok and the job will continue.  The error does not give me any detail other than format error.  Is their any way I can trap for these kinds of error messages to give me more detail of what the problem is????

Thanks
Kenny

0
Comment
Question by:kwh3856
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
iboutchkine earned 500 total points
ID: 12126612
Put it into try catch block and read the error message (err.Description)
0
 

Author Comment

by:kwh3856
ID: 12127543
Is the err.Description a specific function of vb.net where it give more detail.  The way I currently handle the error is as follows:


Try
....
.,..
....

Catch ex As Exception
    MsgBox(ex.ToString())

EndTry

Or does this code do the same thing?

Thanks
Kenny


0
 

Author Comment

by:kwh3856
ID: 12136836
Thanks for the help


Kenny
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question