How to enable export functionality while doing insert to db

Posted by Incubator under C# on 7/5/2012 | Points: 10 | Views : 878 | Status : [Member] | Replies : 4
I have a windows application developed in 2.0 framework using Mysql database as the back up.
Application is acting as an interface to the Mysql database ,where i am having following functionality

1.Reads CSV and insert data to the Mysql database
2.Export the data from the database

I am inserting more than 1,0000 data at time,so while the insert happening user need to export the data already existing in db(say inserted last day)..Is there any mechanism i can apply to get it done??
Thanks
Shandanu




Responses

Posted by: Oswaldlily on: 7/5/2012 [Member] Starter | Points: 25

Up
0
Down
Export to excel ?????

Incubator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Incubator on: 7/5/2012 [Member] Starter | Points: 25

Up
0
Down
Yes.

Thanks
Shandanu

Incubator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 7/5/2012 [Member] Starter | Points: 25

Up
0
Down
Note: VerifyRenderingInServerForm and PrepareGridViewForExport are necessary functions..add as it is without change..else error ll produce

protected void lnkExport_Click(object sender, EventArgs e)
{
if (gv.Rows.Count > 0)
{
Response.Buffer = true;
string attachment = "attachment; filename=Excel.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
gv.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
else
{
lblError.Text="No Records Found";
}
}
public override void VerifyRenderingInServerForm(System.Web.UI.Control control)
{



}
private void PrepareGridViewForExport(System.Web.UI.Control gv)
{
LinkButton lb = new LinkButton();
Literal l = new Literal();
string name = String.Empty;
for (int i = 0; i < gv.Controls.Count; i++)
{
PrepareGridViewForExport(gv.Controls[i]);
}
}

Incubator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Incubator on: 7/5/2012 [Member] Starter | Points: 25

Up
0
Down
Hai
I think you are not clear with my requirement ..I have the functions to export data to excel..

I need to know is there any way to activate an application for doing other functionality (export data)
while another functionality is going on(insert data)
Thanks
Shandanu

Incubator, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response