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

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
kboeckm
Posts: 10
Joined: Tue 14 Jun 2011 20:47

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

Post by kboeckm » Tue 18 Oct 2011 15:01

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?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 19 Oct 2011 11:40

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.

Goransi
Posts: 10
Joined: Thu 23 Jan 2014 22:48

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

Post by Goransi » Thu 23 Jan 2014 22:50

Any progress on this issue? I would require this functionality for our application.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

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

Post by MariiaI » Fri 24 Jan 2014 14:04

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

Post Reply