Getting stored procedure final call from C# using SqlDataAdapter

40 Views Asked by At

I'm using a SqlDataAdapter to call a stored procedure. I'd like to get the final SQL that's produced but I can't seem to find it.

da.UpdateCommand.CommandText;

returns just the stored procedure name.

And

da.UpdateCommand.Parameters[0].Parametername.ToString();
da.UpdateCommand.Parameters[0].Value.ToString();

returns the name and value, but I'd have to put them together into a string and even see which values are strings and put them in quotes myself. There are 51 parameters for this stored procedure alone.

So is there a way I can get the final call that gets sent to SQL that has the stored procedure name and all the parameters put together?

0

There are 0 best solutions below