I have a populated SqlCommand
object containing the command text and parameters of various database types along with their values. What I need is a T-SQL script that I could simply execute that would have the same effect as calling the ExecuteNonQuery method on the command object.
Is there an easy way to do such "script dump" or do I have to manually construct such script from the command object ?