<p>I know how to write trace statements that I can view in a webforms environment, but how do I do this in a windows forms app?</p>

<p>I am inside of a static method, and I want to display the sql query that it is generating.</p>

<p>I don't have access to messagebox.show, what are my options?</p>

You could use a global logging object:
```
```
enum LogLevel
{
    Info,
    Warning,
    Error
}

delegate void OnLog (string msg, LogLevel level);

interface ILogger
{
    void Log(string msg, LogLevel level);
    event OnLog;
}
```
```
Then extend ILogger with a class that you acquire using a public static method in the Program class.
And in your main form, attach yourself to the OnLog event and use it to print messages on the for itself. Then all you have to do is call the Log method in your static method with the SQL query.
:)