There is no mechanism within ADO.NET to fetch the actual command string
that's sent to the server short of using the Profiler.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
[quoted text, click to view] <param@community.nospam> wrote in message
news:%23c8FvxFiIHA.1204@TK2MSFTNGP03.phx.gbl...
> Hi all,
>
> I have a SQLCommand object that has been set with a Stored Proc & the
> required parameters. I would like to somehow retrieve the sql text that is
> sent to sql server as a result of execution of this command object. Is
> that possible? So basically I want to extrapolate the text that ultimately
> looks like this:
>
> exec storedproc @param1=0, @param2=1.....
>
> TIA!
>