views:

66

answers:

2

I've got a data source in Visual Studio. Is there any way to view the SQL that it generates before it sends it to the database?
I don't just want to see the SelectComand, InsertCommand properties which are part of the asp:SqlDataSource, I want to see the query once the parameters have been filled. Is it possible to do this from Visual Studio?

+2  A: 

Don't know the answer, but for such debugging I use SQL profiler.

Edit: For the Oracle, check TKPROF tool. Documentation is here.

You might also need to

alter session set events '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
Viktor Jevdokimov
always the best choice to see what's **REALLY** sent to SQL Server! ;-)
marc_s
But sadly it won't work in my case . . . as I'm using Oracle :)
macleojw
A: 

It doesn't seem to be possible. See the other answer for a possible work around.

macleojw