|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Returning prepared query from SQLXML templatereturn the prepared query (parameters substituted with values passed in) without XML4SQL executing the query? For example, take the following template: <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:header> <sql:param name="Foo" /> </sql:header> <sql:query> select * from MyTable where ID = @Foo for xml auto </sql:query> </ROOT> If the value of 'Foo' is 10, the following would be returned: select * from MyTable where @ID = 10 for xml auto This feature would be very handy for debugging purposes. Thanks, Andrew Not directly. You can check what is being sent over the profiler or write
select 'select * from MyTable where ID = ' + @Foo + 'for xml auto' inside the sql:query element. HTH Michael Show quote "Andrew Hilton" <hilt***@ocean.com.au.spamfree> wrote in message news:uBjCRz%232EHA.3408@tk2msftngp13.phx.gbl... > If you have an SQLXML template, with some parameters, is there any way to > return the prepared query (parameters substituted with values passed in) > without XML4SQL executing the query? > > For example, take the following template: > > <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> > > <sql:header> > > <sql:param name="Foo" /> > > </sql:header> > > <sql:query> > > select * from MyTable where ID = @Foo for xml auto > > </sql:query> > > </ROOT> > > > If the value of 'Foo' is 10, the following would be returned: > select * from MyTable where @ID = 10 for xml auto > > This feature would be very handy for debugging purposes. > > Thanks, > Andrew > > |
|||||||||||||||||||||||