Hi All,
Im getting this error (Object is not set to an instance of an object) at which i highlited in red line.while im getting the Item XMLs from GP by using Econnect.Please help me .
using (eConnectMethods eConnectMethod = new eConnectMethods())
{
eConnectOut myRequest = new eConnectOut();
myRequest.DOCTYPE = ecQuery.DocumentType;
myRequest.OUTPUTTYPE = 2;
myRequest.FORLIST = 1;
myRequest.WhereClause = ecQuery.WhereClause;
RQeConnectOutType[] eConnectOutType =
new RQeConnectOutType[1] { new RQeConnectOutType() };
eConnectOutType[0].eConnectOut = myRequest;
eConnectType eConnectDoc = new eConnectType();
eConnectDoc.RQeConnectOutType = eConnectOutType;
// Serialize the object to produce an XML document
MemoryStream memStream = new MemoryStream();
XmlSerializer serializer = new XmlSerializer(typeof(eConnectType));
serializer.Serialize(memStream, eConnectDoc);
memStream.Position = 0;
XmlDocument myDoc = new XmlDocument();
myDoc.Load(memStream);
// Retrieve the specified customer document
result = eConnectMethod.GetEntity(sConnectionString, myDoc.OuterXml);
if (result == "<root></root>")
{
return "";
}
}
*This post is locked for comments