开发者

How can I see the actual SQL an ASP SqlDataSource will run (after binding)

开发者 https://www.devze.com 2022-12-09 05:45 出处:网络
This is a very simple question, but one I can\'t find an answer to. If I have an SqlDataSource that takes parameters, how can I see the actual SQL that will be executed against the DB after the bindin

This is a very simple question, but one I can't find an answer to. If I have an SqlDataSource that takes parameters, how can I see the actual SQL that will be executed against the DB after the binding takes place? (I have tried adding a breakpo开发者_如何学Goint to code on the onBinding event of the SqlDataSource)

Thanks for any help

Ryan


You will need to use a profiling tool at the database end to get the actual SQL executed. For Sql Server you can use Sql Profiler.


The SqlDataSource.SelectCommand should show you the text of the command that will be executed.

0

精彩评论

暂无评论...
验证码 换一张
取 消