Murach's Visual Basic 2008
How to handle exceptions and validate data

First, this chapter shows you how to use structured exception handling so you can create bulletproof applications. Then, it shows you the best ways to validate the data that the user enters so exceptions are avoided. Frankly, this is the best material on data validation that we've ever seen.

Chapter 7 How to handle exceptions and validate data
An introduction to data validation and exception handling 190
How to use the IsNumeric function for data validation 190
How to display a dialog box for error messages 192
How exception handling works 194
How to use structured exception handling 196
How to catch an exception 196
How to use the properties and methods of an exception 198
How to catch specific types of exceptions 200
How to throw an exception 202
The Future Value application with exception handling 204
How to validate data 206
How to validate a single entry 206
How to use generic procedures to validate an entry 208
How to validate multiple entries 210
The Future Value application with data validation 212
The dialog boxes 212
The code 212
Two other ways to validate data 216
How to use the Validating event 216
How to use the masked text box 218




Murach's VB 2008

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.