Is it possible to easily convert SqlCommand to T-SQL string ?

Posted by Thomas Wanner on Stack Overflow See other posts from Stack Overflow or by Thomas Wanner
Published on 2010-03-30T08:49:58Z Indexed on 2010/03/30 8:53 UTC
Read the original article Hit count: 392

Filed under:
|
|
|
|

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 ?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#