Page 1 of 1

Devart.Data.Linq.Monitoring - Logging the SQL Parameters

Posted: Tue 18 Oct 2011 15:01
by kboeckm
I've set up an event handler in the OnCreated event of my datacontext. The event handler looks like this:

Code: Select all

        static void OnEvent(object sender, MonitorEventArgs e)
        {
            if (e.TracePoint == MonitorTracePoint.BeforeEvent && (e.EventType == MonitorEventType.Execute || e.EventType == MonitorEventType.Error))
            {
                Common.Log.Verbose(string.Format("Description: " + e.Description));
                Common.Log.Verbose(string.Format("Extra info: " + e.ExtraInfo));
            }
        }
That works fine to log the sql statement. However, I can't figure out how to log the input/output parameters. The dbMonitor tool is able to log the parameters so I'm guessing there is a way to do it. Has anybody figure out how to do this?

Posted: Wed 19 Oct 2011 11:40
by StanislavK
At the moment, the MonitorEventArgs class stores no information about the parameters passed to the SQL command being executed.

However, we plan to support tracking SQL parameters via the DbMonitor component events. We will post here when this support is implemented.

Re: Devart.Data.Linq.Monitoring - Logging the SQL Parameters

Posted: Thu 23 Jan 2014 22:50
by Goransi
Any progress on this issue? I would require this functionality for our application.

Re: Devart.Data.Linq.Monitoring - Logging the SQL Parameters

Posted: Fri 24 Jan 2014 14:04
by MariiaI
This functionality has not been implemented yet and we can't tell any timeframe at the moment. We will inform you about the results as soon as any are available.
Please post your suggestion at our UserVoice so that other users can vote for it.

JIC: you could check the generated SQL scripts with the parameters via DbMonitor: http://www.devart.com/linqconnect/docs/?dbMonitor.html