views:

23

answers:

2

I am debugging code written by a previous developer :-)

I have a SQLDataSource control that is calling a database stored procedure, and passing quite a large number of paramaters, and the stored proc returns records that populates a gridview control.

When I walk through the code behind to determine the values being passed, is there any way that I can see exactly how the parameters are being formated and passed to the stored proc?

A: 

You can use SqlDataSource's Updating event for this. It's parameter SqlDataSourceCommandEventArgs has a property Command that contains the parameters for the query.

Ronald Wildenberg
+1  A: 

Instead of trying to unpick them from Code-behind, use Sql Profiler. If you are using the Express version, there's a Profiler for that too: AnjLab Sql Profiler

MikeB
I am aware of SQL profiler, but not sure how to configure it. I tried looking around on the web, finally gave up. Got any tips regarding profiler? BTW, using the enterprise version of SQL 2005.
user279521
nevermind, I think I figured out the profiler issue.
user279521