Solved

How to trap for format errors in vb.net

Posted on 2004-09-22
3
140 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal reports vb.net 2 41
VB.Net - MemoryMappedFiles - Confirm receipt 2 19
Get distinct values from excel or comm seperated file 4 28
vb.net and creating a class 5 17
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

832 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