Friday, February 24, 2012

Logging to sql DB using Enterprise Library

HI all,

i want to log different activities of my application like (order approved, order rejected etc) to a sql database using Enterprise Library 2.0.can anyone help me by giving a link(step by step procedure for this).or explain how to create my own sample application to log some event to DB(by creating a new database and tables for this).Thanks in advance.

regards,

Jon.

Hi 2ujohn,

I'm sorry i'm not so familiar with enterprise library 2.0. But i think if i were in your case, i would create an event on "order approved" and "order rejected", and in the event handler, i would write some recoreds to a sql database(well, how to design the database schema is another story). Or , even more simple, i would try if i can programe in sql server directly, like this: assuming there is a table named Approved Order, everytime there is new record added to this table, i would create a corresponding record in another table: RecordLoging. And i woud use trigger for that.

Hope my suggestion can help

No comments:

Post a Comment