Jump to content

Large Amount of Data Retrieving using XElement in C# Windows Application


Brinda

Recommended Posts

Hello Everyone,

'm developing software Customer Management System in C# windows application based on XML Database. In my database near by 1,00,000 entries. i have a trouble in retrieving 1,00,000 entries. its take more time to show the data. let me know the fast retrieving solutions as soon as possible.

Its My Coding (Retrieving)

XElement xelement1 = XElement.Load(ZXmlDetails.Path + @"Noti_Payment.hash");                var detailss1 = (from nm in xelement1.Elements("Details")                                 orderby (String)nm.Element("IBillNo")                                 select nm);                if (detailss1.Count() > 0)                {                    foreach (var xEle1 in detailss1.Distinct())                    {                        int x = PaymentLoop.Rows.Add();                        PaymentLoop.Rows[x].Cells[0].Value = xEle1.Element("IBillNo").Value.ToString();                        PaymentLoop.Rows[x].Cells[1].Value = xEle1.Element("CName").Value.ToString() + " -- " + xEle1.Element("CPhoneNo").Value.ToString();                        PaymentLoop.Rows[x].Cells[2].Value = xEle1.Element("NetTotal").Value.ToString();                        PaymentLoop.Rows[x].Cells[3].Value = Convert.ToDouble(xEle1.Element("NetTotal").Value.ToString()) - Convert.ToDouble(xEle1.Element("Payment").Value.ToString());                    }                }

Thanks & Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...