ProgrammingMSAccess.com

Learn about Developers Group
Join Developers Group
Order SPAM Blocker
Free Stuff
Guest Book
.NET Resources
SQL Server Resources
Favorites
Technical Support
Books & DVDs by Webmaster
Articles, tutorials, & more
FAQs
Product Reviews
Samples
Prior Newsletters
Contact Us
Home
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IT IS COMMONLY BELIEVED THAT EXCEPTION PROCESSING SLOWS APPS.  THROWING AND CATCHING AN EXCEPTION BEFORE A FORM OPENS REMOVES ALL OF THE SLOWING EFFECT AFTER A FORM OPENS.  the FOLLOWING CODE SEGMENT ILLUSTRATES THE LOGIC FOR THROWING AN DBCONCURRENCYEXCEPTION IN A FORM'S LOAD EVENT SO THAT THE ERROR WILL NOT SLOW OPERATION AFTER THE FORM OPENS.  assigning FALSE TO precompile WILL SPEED THE FORM LOAD EVENT BUT SLOW THE APPLICATION FOR THE FIRST INVOCATION OF A DBCONCURRENCYEXCEPTION.

#Const PreCompile = True
#If PreCompile Then
Try
Throw New DBConcurrencyException("exception for compilation")
Catch ex As Exception
'Debug.WriteLine(ex.Message)
End Try
#End If

Learn more about VB.NET programming from either Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .NET or Programming Microsoft Visual Basic .NET for Microsoft Access Databases.

Copyright 2003 CAB, Inc. All rights reserved. Republication or redistribution of CAB, Inc. content, including by framing or similar means, is expressly prohibited without the prior written consent of CAB, Inc. CAB, Inc. shall not be liable for any errors in the content, or for any actions taken in reliance thereon.