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+’<root>’;+select+nomprogramme+from+dbo.programme_produit+FOR+XML+RAW;+select+’</root>’;<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+’<root>’;+select+domaine+from+dbo.solenne_pac+FOR+XML+RAW;+select+’</root>’;.>http://localhost/ApplixSQL?sql=select+’<root>’;+select+domaine+from+dbo.solenne_pac+FOR+XML+RAW;+select+’</root>’;.</a> <br /></pre><br /><br /><br />and in a template file with : <br /><pre><?xml version="1.0" encoding="ISO-8859-1"?><br /> <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’><br /> <br /> <sql<img src=’/community/emoticons/emotion-41.gif’ alt=’:q’ />uery><br /> SELECT idprogramme <br />FROM dbo.programme_produit<br />FOR XML AUTO<br /> </sql<img src=’/community/emoticons/emotion-41.gif’ alt=’:q’ />uery><br /> </ROOT></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 <root /> 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 inhttp://www.sqlxml.org for any reference with regard to the issue. HTH Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
]]>