How do I view the "parsed" command text for a stored procedure before it gets sent to the database?
I have a page updating a database using a stored procedure and passed arguments...
*****************************************
Dim myConnection As New SqlConnection(ConnectionString)
Dim myCommand As SqlCommand = new SqlCommand("sp_update_account", myConnection)
myCommand.Connection = myConnection
Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure
setup all stored procedure parameters from text field values
......removed for brevity
myConnection.Open()
myCommand.ExecuteNonQuery()
*****************************************
I want to view the parsed myCommand.CommandText before it reaches the database.
When I view the CommandText I only get "sp_update_account", I want to see teh exact command being passed to the SQL Server Database.
My procedure isnt updating the database and Im not recieving an error, so I need to view the exact SQL text being passed.
Is this possible?
I have a page updating a database using a stored procedure and passed arguments...
*****************************************
Dim myConnection As New SqlConnection(ConnectionString)
Dim myCommand As SqlCommand = new SqlCommand("sp_update_account", myConnection)
myCommand.Connection = myConnection
Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure
setup all stored procedure parameters from text field values
......removed for brevity
myConnection.Open()
myCommand.ExecuteNonQuery()
*****************************************
I want to view the parsed myCommand.CommandText before it reaches the database.
When I view the CommandText I only get "sp_update_account", I want to see teh exact command being passed to the SQL Server Database.
My procedure isnt updating the database and Im not recieving an error, so I need to view the exact SQL text being passed.
Is this possible?