Database not updating by Database Trace Listener

Topics: Logging Application Block
Nov 28, 2007 at 10:41 AM
i have a windows application with App.Config file.

i added a Database Trace Listener to the 'Trace Listeners' folder
i set the database instance of the Database Trace Listener to the localSqlServer ( SQL server 2005 Express Edition ) and pointed to 'logging' Database.
i tested the database connection - it works great.
i also set the Formatter to text formatter,
WriteLogStoredProcedureName to WriteLog and
AddCategoryStoredProcedure to AddCategory.

i added a reference to the Database Trace Listener in :
Category Sources->General and in
Special Sources->Logging Errors & Warnings and in
Special Sources->Unprocessed Category

and wrote this code :

LogEntry le = new LogEntry();
le.TimeStamp = System.DateTime.Now;
le.Message = "Testing both our Custom Trace Listener and our Database Trace Listener";
le.EventId = 9876;
le.Title = "Two Categories";
le.Priority = 1;
Logger.Write(le);

When i run the application everything works fine without exceptions but the thing is that after i close the application and open the dbo.log table to see if
something was updated, i can see that there is no row in the table.
The log row is not added to the database although everything worked fine.

why ?
Help!!!
Mar 26, 2008 at 10:31 PM
I have the same problem, too... Any idea, please??
Apr 2, 2008 at 7:12 PM
Did you include the reference Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll in your client project?
May 15, 2008 at 8:18 PM
I have the same issue and I have Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll  as a reference. 

billkim wrote:
Did you include the reference Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll in your client project?