Solved

How to trap for format errors in vb.net

Posted on 2004-09-22
3
136 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
Comment Utility
Put it into try catch block and read the error message (err.Description)
0
 

Author Comment

by:kwh3856
Comment Utility
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
Comment Utility
Thanks for the help


Kenny
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now