ralphtrent
Programmer
Hi
I am creating an sql string using Parameters. I set my commandtext of my SqlCommand object to something like this:
Now what will get executed on my server will be this
How can I see the sql that .Net will send to the server. I have tried using the Prepare property, then spit out the CommandText, but that does not seem to do the trick.
Any idea's?
Thanks
I am creating an sql string using Parameters. I set my commandtext of my SqlCommand object to something like this:
Code:
sc.CommandText = "select * from table where value = @parmValue"
sc.Parameter.Add("@parmValue","123")
Now what will get executed on my server will be this
Code:
select * from table where value = '123'
How can I see the sql that .Net will send to the server. I have tried using the Prepare property, then spit out the CommandText, but that does not seem to do the trick.
Any idea's?
Thanks