Avatar of sainavya1215
sainavya1215
 asked on

Writing and Using EvenLog Class module

hi,

I need to write a class module which will be used in other classes to get the exception if any to the EventLog.

1)The eventLog should also contain if any program errors involved..How can we write it and implement..

2)Lets say I have the following class where I have to use it when exception is throw in function


public class COrders
   Public function GetOrdersForCustomer(ICustomerID as integer) as dataset
             
   Try
      dim id as integer = Mcommand.parameters("@Return_value").value

     Catch Ex as exception
        Throw EX  
   End try
 End function
End class
Visual Basic.NET

Avatar of undefined
Last Comment
liebrand

8/22/2022 - Mon
liebrand

Take a look at Microsoft Exception Application Block -- this will do everything you want it too and more. Worse case, you can see how they are doing it and write your own.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/emab-rm.asp
sainavya1215

ASKER
I am bit confused regarding the difference of using Eventlog Class and the one which you had mentioned
http://support.microsoft.com/kb/301279/EN-US/
ASKER CERTIFIED SOLUTION
liebrand

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23