views:

2265

answers:

3

Can anyone provide (or point me to) example sql code for logging exceptions using Enterprise Library Exception Handling Application Block (EHAB)? ie I'd like standard CREATE TABLE and CREATE PROCEDURE statements for the structures and procs to store logged exceptions in a SQL Server database.

Also, can anyone describe how the app block calls the procedures [WriteLogStoredProcedureName] and [AddCategoryStoredProcedureName] (e.g. what parameters should these have and how are they set) or where the documentation for this is?

(NB: I'm using Enterprise Library 3.1 - May 2007 as I'm using .net 2.0)

A: 

Here?

GregD
+2  A: 

So far I've found this and this as code examples for creating tables and the two stored procedures needed.

Rory
+1  A: 

Default value of [WriteLogStoredProcedureName] is "WriteLog". Default value of [addCategoryStoredProcName] is "AddCategory".

Install Enterprise Library and you will get script "C:\EntLib3Src\App Blocks\Src\Logging\TraceListeners\Database\Scripts\LoggingDatabase.sql". After executing this script, you will get "Logging" database ready with all required Stored procedures and tables.

Harshad