Sunday, February 19, 2012

Can a stored procedure be viewed with trace?

Ok this should be easy but I haven't found an aswer.

I have a stored procedure in a SQL Server database I use it to add new records to a table. I assign values to parameters and ExecuteNonQuery();

I'm getting an error input string invalid. I'm sure its due to null values which I can troubleshoot on my own.

I know how to view the contents of an inline sql statement in classic ASP such as mySQL = "Select authors from pubs" and then Response.Write mySQL. But how do I do this for a stored procedure in .NET?

Tracing for the page is on. I've tried Trace.Write (sqlCommand1.CommandText); but I don't see the command text.

What am I missing?OK Got It. Went into SQL Server and used SQL Server Profiler.

No comments:

Post a Comment