I'm working in Visual Studio 2005 with VB.NET. In the 2005 environment, you can work with GridViews and other helpful tools that do the work for you so that you don't have to build much code.
That would be fine and good, but when problems arise, troubleshooting is difficult. Quite often I feel that if I could only see the actual SQL query that is sent to the database, I could easily resolve my problems. I have found out how to view the basic SQL code, (SQLDataSource.SelectCommand.ToString) but that doesn't fill in the values passed with the parameter which is used, so it doesn't help. I've seen code for capturing parameter values, but that doesn't add all of the formatting that would be in the final SQL code.
Can anyone help me by telling me how to capture the actual SQL code (with my parameter information imbedded in it) as it appears when it is presented to the database?
Thanks!
That would be fine and good, but when problems arise, troubleshooting is difficult. Quite often I feel that if I could only see the actual SQL query that is sent to the database, I could easily resolve my problems. I have found out how to view the basic SQL code, (SQLDataSource.SelectCommand.ToString) but that doesn't fill in the values passed with the parameter which is used, so it doesn't help. I've seen code for capturing parameter values, but that doesn't add all of the formatting that would be in the final SQL code.
Can anyone help me by telling me how to capture the actual SQL code (with my parameter information imbedded in it) as it appears when it is presented to the database?
Thanks!