Click here to Skip to main content
15,896,496 members

Comments by kav@94 (Top 105 by date)

kav@94 28-Mar-18 5:43am View    
i had already tried this but i am unable to get the required output
kav@94 14-Mar-18 7:58am View    
below is the code which i have tried as suggested by you
try
{
XmlDocument Docs = new XmlDocument();
Docs.Load(Server.MapPath("~/Sample.xml"));
XmlElement root = Docs.DocumentElement;
DataTable dt = new DataTable();
dt.Columns.Add("Bnum");
dt.Columns.Add("Pnum");
dt.Columns.Add("Vnum");
dt.Columns.Add("Vnum");
dt.Columns.Add("Cdilute");
dt.Columns.Add("Test");
dt.Columns.Add("Mcode");
XmlNodeList nodes = root.SelectNodes("????????");
foreach (XmlNode node in nodes)
{
dt.Rows.Add(node["SID"].InnerText.ToString(),
node["Pnum"].InnerText.ToString(),
node["Vnum"].InnerText.ToString(),
node["Vnum"].InnerText.ToString(),
node["Code"].InnerText.ToString(),
node["Cdilute"].InnerText.ToString(),
node["Mcode"].InnerText.ToString()
);
}
return dt;
}
catch (Exception es)
{
throw es;
}
but it is going into catch block and giving me the exception object reference not set to instance of object.I am unable to get how to provide the relation in this line XmlNodeList nodes = root.SelectNodes("????????"); to get the value of get the value of each node and subnode
kav@94 14-Mar-18 6:53am View    
That is what i am unable to get it i was already trying in the same way
kav@94 20-Feb-18 2:56am View    
Hi thanks for your quick reply i want to do this delete operation using query not through stored procedure
kav@94 1-Feb-18 7:29am View    
again in lnkCompletedBatches() usrer is becoming empty