No row with a FOR XML select containing 'prog' | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

No row with a FOR XML select containing ‘prog’

Hi !<br /><br />I have a problem retrieving rows from a query I’m trying to execute either in the url with the statement :<br /><pre>http://localhost/ApplixSQL?sql=select+’&lt;root&gt;’;+select+nomprogramme+from+dbo.programme_produit+FOR+XML+RAW;+select+’&lt;/root&gt;’;<br /></pre><br /><br />the result is : <br /><pre>(this is saying that ‘root’ tag has not been closed, but it was !)<br />Les balises suivantes n’ont pas été fermées : root. <br />Erreur de traitement de la ressource<a target="_blank" href=http://localhost/ApplixSQL?sql=select+’&lt;root&gt;’;+select+domaine+from+dbo.solenne_pac+FOR+XML+RAW;+select+’&lt;/root&gt;’;.>http://localhost/ApplixSQL?sql=select+’&lt;root&gt;’;+select+domaine+from+dbo.solenne_pac+FOR+XML+RAW;+select+’&lt;/root&gt;’;.</a> <br /></pre><br /><br /><br />and in a template file with : <br /><pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;<br /> &lt;ROOT xmlns<img src=’/community/emoticons/emotion-7.gif’ alt=’:s’ />ql=’urn<img src=’/community/emoticons/emotion-7.gif’ alt=’:s’ />chemas-microsoft-com<img src=’/community/emoticons/emotion-12.gif’ alt=’:x’ />ml-sql’&gt;<br /> <br /> &lt;sql<img src=’/community/emoticons/emotion-41.gif’ alt=’:q’ />uery&gt;<br /> SELECT idprogramme <br />FROM dbo.programme_produit<br />FOR XML AUTO<br /> &lt;/sql<img src=’/community/emoticons/emotion-41.gif’ alt=’:q’ />uery&gt;<br /> &lt;/ROOT&gt;</pre><br /><br />and calling that file through :<a target="_blank" href=http://localhost/ApplixSQL/template/file.xml>http://localhost/ApplixSQL/template/file.xml</a><br />(the result is just &lt;root /&gt; as if there were no rows in the result)<br /><br /><br />ApplixSQL is the name of the database. I already submitted other query using templates files and everything worked fine. I think the problem can be linked with the name of the table : I tried to execute many query is the url and the only ones who doesn’t work are the ones with ‘prog’ inside the tablename (here my tablename is programme_produit). I precise that the statement works in SQL Query Analyser. <br /><br /><br /><br />Does anyone have an idea ? <br /><br />Thanks<br /><br /> <br />
I’m no expert in XML but may try searching in for any reference with regard to the issue. HTH Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.