Recently when I was using LINQ to SQL (which I happen to love so much) and using the LINQ to SQL debug visualizer tool (which can be found here) to see what query was getting generated I came across an issue. below is a screen-shot of the query I was looking at.
If I inspected it in the quick-watch window, everything was fine. I get one member in my results collection.
However, when I look it up in the LINQ to SQL debug visualizer window, the SQL statement that is shown is not right. I see that the string parameter in that statement has not been enclosed in quotes. And hence when I click the execute button I get an exception.
So it goes to show that there is an issue in the visualizer even though the actual query seems to run perfectly fine.
I also saw a post regarding this behavior on the LINQ Project Forum and my advice to the people who have had this issue to keep the above issue in mind while debugging.