Logging - Can LogID value be returned after Insert?

Topics: Logging Application Block
Nov 20, 2007 at 12:14 PM
Hi all,

I am writing a row to table Log using the WriteLog stored procedure that comes with EL 3.1. While doing the insert, can I retrieve the value of LogID? This is the primary key column in table Log.

Nov 20, 2007 at 1:28 PM
Hi Bob,

Where do you need this id? In your app? There are really a few layers of abstraction between the app and the database trace listener (potentially multiple categories and trace listeners, and the entry may even be filtered out), so there is really no sensible way to get this id back to the application; you're not supposed to have dependencies on the concrete logging mechanisms.

Is it possible you need to use a different mechanism instead of the LAB?