LINQ - MySQL - Is it possible to debug?

LINQ - MySQL - Is it possible to debug?

Postby Blue56 » Mon 31 Aug 2009 13:40

I am using MySQL and would like to see the sql statements that is send to the database-server. Can I do that?

I can do it with LINQ to SQL. Described here: ... lizer.aspx
Posts: 1
Joined: Mon 31 Aug 2009 13:17

Postby Zero-G. » Tue 01 Sep 2009 10:09


There are two ways to see the LinQ2SQL Statement, which is sent to the server.

1) You can use the log of the DataContext you have created
Code: Select all
DataContext.Log = Console.Out

2) You can use the MySQL Monitor (I think it is a free tool here)
Code: Select all
Dim myMonitor As New Devart.MySQL.MysqlMonitor
myMonitor.Active = True

Dim mySQL = Query From myDataContext.Customers

For Each row in mySQL


When you open the MySQL Monitor, you can see all the Statements as well.

I hope the code was written correct. I did it out of my mind...
Posts: 390
Joined: Sat 09 Dec 2006 12:20

Return to LinqConnect (LINQ to SQL support)