The final product generated by ADO.NET is not exposed as a public property
unless you enable Trace. What you can do is use the Profiler to see what's
generated and sent to the server.

Signature
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
> Given a technique similar to the following, instead of actually
> executing the Stored Procedure, I need the resulting SQL command string
[quoted text clipped - 25 lines]
>
> Jim
jim_adams@hotmail.com - 13 Jan 2006 19:40 GMT
Hi Bill,
Thanks for the suggestion.
The problem is that to generate the Trace, the SQL statements have to
be run. Certain times, especially when dealing with shared SQL
clusters, a DBA needs to manually review and run scripts via Query
Analyzer. Having a binary app do this without DBA review is against
policy. So in this case, instead of running the SPROCS, my app needs
to produce a work file.
Thanks again for your help.
Jim