Hi alll..
How to handle huge volume of data ( more than 10 lakhs records) ??
Requirement - In database (either Oracle or SQL Server ), I want a facility such that more than 5 lakhs records be inserted , and can be displayed in gridview.
Loading huge amount of records is causing SQL Server Error - "Time Expired".
One option is database-level paging using Row_number() function with page index and page size.
But, one more requirement is - on button click, I want all these records to be exported to excel..
How do I do this ?
Also, How do we handle this large volume of data in LINQ ??
PLease guide
Loading

Manas MohapatraRank #182 · 13.2K reputationPosted Apr 13, 2016, 9:12 PM EDT
Riddhi ValechaRank #794 · 2.9K reputationPosted Apr 14, 2016, 2:22 AM EDT
public override void VerifyRenderingInServerForm(Control ctrl)
{
return;
}
private string GetString(object o)
{
if (o == null)
return "";
return o.ToString();
}
private void ExportToExcel()
{
try
{
table = new DataTable();
table = (DataTable)Session["Data"];
if (table != null)
{
grdv = new GridView();
grdv.DataSource = table;
grdv.DataBind();
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "attachment;filename=Employee Report.xls");
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHTMLTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
grdv.RenderControl(oHTMLTextWriter);
Response.Write(oStringWriter.ToString());
Response.End();
}
}
catch (Exception err) { err.Message.ToString(); }
}
#endregion
Manas MohapatraRank #182 · 13.2K reputationPosted Apr 14, 2016, 3:00 AM EDT
Riddhi ValechaRank #794 · 2.9K reputationPosted Apr 14, 2016, 3:37 AM EDT
For export to excel , on one button click event, I have to export 3 lakhs records at a time.
This is taking time (2-3mins) and still giving error -"Time Expired".
How do I do this ?
Also, I want solutions for all 3 ways of handling the huge amount of data...
Posted Apr 15, 2016, 9:10 PM EDT
Riddhi ValechaRank #794 · 2.9K reputationPosted Apr 19, 2016, 10:24 PM EDT
Rahul ChavanRank #2,671 · 521 reputationPosted Apr 20, 2016, 2:07 AM EDT