Hello
I am developing ASP.NET applications with the ASP.NET Development Server (not with IIS) and I'd like to monitor my LINQ statements. Unfortunately the monitoring with the DBMonitor is very unreliable. Sometimes it traces some SQL statements and sometimes nothing is traced. Sometimes the monitoring works only after many trials.
Right now I have a problem where I can try as much as I want, but nothing will ever be monitored. I ensured to start DBMonitor first and then start the debug session of my Visual Studio where I instantiate MySQLMonitor and set the IsActive property to true.
Is there anything I can do about this? Are there other (more reliable) ways to monitor the generated SQL statements of my LINQ statements?
Best regards
PS: Maybe monitoring is the wrong approach. When developing Microsoft LINQ, I use LINQPad (www.linqpad.net) to debug my linq statements. This tool is absolutely great. You should contact them and encourage them to implementyour MySQL LINQ provider.
________
Brunette schoolgirl
DBMonitor not working properly
-
- Posts: 43
- Joined: Wed 17 Sep 2008 11:31
DBMonitor not working properly
Last edited by [email protected] on Thu 17 Mar 2011 10:11, edited 1 time in total.
You can use the Datacontext.Log property for monitoring SQL statements generated by LINQ to MySQL.
To implement this you can add the code like the following:
To implement this you can add the code like the following:
Code: Select all
DataContext1 db = new DataContext1();
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
db.Log = sw;
...
string log = sb.ToString();
-
- Posts: 43
- Joined: Wed 17 Sep 2008 11:31
Is it possible that DBMonitor does not support complex queries?
I just found out that monitoring of this statement is working:
but this one is not working...
________
Maine Dispensaries
I just found out that monitoring of this statement is working:
Code: Select all
var recordSet = (from m in PPCustomer.Mailings
select m);
int totalMailings = recordSet.Count();
Code: Select all
var recordSet = (from m in PPCustomer.Mailings
join mr in PPCustomer.MailingRecipients on m.MailingId equals mr.MailingId
select m);
int totalMailings = recordSet.Count();
Maine Dispensaries
Last edited by [email protected] on Thu 17 Feb 2011 05:22, edited 1 time in total.
We cannot reproduce the problem.
1. Please specify your versions of dotConnect for MySQL and DbMonitor:
- the Tools | MySQL | About menu of Visual Studio;
- the Help |About menu of DbMonitor.
2. Are there any other statements that are not shown in DbMoniror?
3. Please describe the situation when it doesn't work. You have the MySqlConnection object in DbMonitor, but there is no MySqlCommand object, is there? Or MySqlCommand is shown in DbMonitor, but it doesn't contain the statement that was executed?
1. Please specify your versions of dotConnect for MySQL and DbMonitor:
- the Tools | MySQL | About menu of Visual Studio;
- the Help |About menu of DbMonitor.
2. Are there any other statements that are not shown in DbMoniror?
3. Please describe the situation when it doesn't work. You have the MySqlConnection object in DbMonitor, but there is no MySqlCommand object, is there? Or MySqlCommand is shown in DbMonitor, but it doesn't contain the statement that was executed?