I have a InfoPathe - code in c# .NET.
I have a Web Reference to SharePoint Web Service - GetListItems().
I operate this code:
XmlDocument xmlDoc = new System.Xml.XmlDocument();
XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element,"Query","");
XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element,"ViewFields","");
XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element,"QueryOptions","");
string str=this.thisXDocument.DOM.selectSingleNod("//my:IDNumber").text;
ndQueryOptions.InnerXml= "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" +
"<DateInUtc>TRUE</DateInUtc>";
ndViewFields.InnerXml = "<FieldRef Name='Fname' /><FieldRef Name='Lname'/>";
ndQuery.InnerXml="<Where><Eq><FieldRef Name='Fname'/><Value Type='String'>" + str +"</Value></Eq></Where>";
try
{
XmlNode returnXml = s.GetListItems("MyList",null,ndQuery,ndViewFields,null,ndQueryOptions);
this.thisXDocument.UI.Alert(returnXml.OuterXml);
}
catch (System.Web.Services.Protocols.SoapException ex)
{
this.thisXDocument.UI.Alert("Message:\n" + ex.Message + "\nDetail:\n" +
ex.Detail.InnerText +
"\nStackTrace:\n" + ex.StackTrace);
}
I get eroor of "Field with this name not exist"
What is the problem