user2095748
user2095748

Reputation: 267

how to use greater than symbol in xml to write sql query

//This is my xml file
<sql id="data8">select .......... and DATEDIFF(CURDATE(),modified_date) > 7 group by ......</sql>

//And i am accessing this in webmethod in aspx.cs page.

 var doc = new XmlDocument();
 doc.Load(Server.MapPath("XMLFile.xml"));
    string cmdstr = doc.DocumentElement.SelectSingleNode("//queries/sql[@id='data8']").InnerXml;

But i am getting error "Unknown column 'gt' in 'where clause'". PLease help

Upvotes: 1

Views: 153

Answers (1)

H. Herzl
H. Herzl

Reputation: 3228

Please try read InnerText property's value instead of InnerXml

Upvotes: 2

Related Questions