Link to home
Start Free TrialLog in
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
Avatar of liebrand
liebrand
Flag of United States of America image

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
Avatar of sainavya1215
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
Avatar of liebrand
liebrand
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial