I am trying to import excel data(10,000) into database by using DocumentFormat.OpenXml.dll assembly it works fine in localhost and finally display the message successfully imported but when it is deployed on server then it doesn't show the msg "record imported
successfully" but it shows the messages for 7000 record can any expert suggest me how to display the message when its deployed on server? I have tried with Commandtimeout and Connection timeout property but the message still not displayed.
after successfully imported all the records I passed msg code in SP OUTPUT parameter and based on that message code I displayed the message using asp.net Label which is in user control.
Can you show us your codes of showing the messageBox?
yaa.. below the code
int iResult = sqlCmd.ExecuteNonQuery();
int status=Convert.ToInt32(sqlCmd.Parameters["Status"].Value); // OUTPUT parameter
string msg = Convert.ToString(sqlCmd.Parameters["Msg"].Value); // OUTPUT parameter
lblMsg.Text = msg; // lblMsg is in user control named ucStatus.
Can you show us your codes of showing the messageBox?
yaa.. below the code
int iResult = sqlCmd.ExecuteNonQuery();
int status=Convert.ToInt32(sqlCmd.Parameters["Status"].Value); // OUTPUT parameter
string msg = Convert.ToString(sqlCmd.Parameters["Msg"].Value); // OUTPUT parameter
lblMsg.Text = msg; // lblMsg is in user control named ucStatus.
Your codes look nice……So do you mean you cannot show values in the lblMsg?
ZeeshanAnsar...
Participant
878 Points
264 Posts
Message does not display after importing bulk records in asp.net
Dec 31, 2012 10:00 AM|LINK
I am trying to import excel data(10,000) into database by using DocumentFormat.OpenXml.dll assembly it works fine in localhost and finally display the message successfully imported but when it is deployed on server then it doesn't show the msg "record imported successfully" but it shows the messages for 7000 record can any expert suggest me how to display the message when its deployed on server? I have tried with Commandtimeout and Connection timeout property but the message still not displayed.
Please 'Mark as Answer' if this post helps you.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 01:03 AM|LINK
What codes have you written?
Any exceptions?
What has anything to do with the rest 7000 records?
ZeeshanAnsar...
Participant
878 Points
264 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 04:31 AM|LINK
Actually I import excel data in the following steps
1) first of all loading data into datatable from excel sheet data using DocumentFormat.OpenXml.dll assembly
2) bulk copy datatable data into database table using bulkcopy class
3) performing validation on the temperory table in the stored procedure
4) finally loading the valid data in other temporary table
5) executing the Insert sp to insert the the record one by one.
6) after all the valid records inserted the messages shown on server that "x records imported successfully".
the problem is only the message doesn't come when its deployed on server but apear on loalhost.
message comes till 7000 records but when its more than 7000 records message doesn't come.
above 6 steps takes around 10 to 12 mins on 4mbps internet speed.
Please 'Mark as Answer' if this post helps you.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 05:26 AM|LINK
How did you show this message?Using ClientScript.RegisterStartUpScript or……?
ZeeshanAnsar...
Participant
878 Points
264 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 05:48 AM|LINK
No ..
after successfully imported all the records I passed msg code in SP OUTPUT parameter and based on that message code I displayed the message using asp.net Label which is in user control.
Please 'Mark as Answer' if this post helps you.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 06:23 AM|LINK
Can you show us your codes of showing the messageBox?
ZeeshanAnsar...
Participant
878 Points
264 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 06:42 AM|LINK
yaa.. below the code
Please 'Mark as Answer' if this post helps you.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 08:08 AM|LINK
Your codes look nice……So do you mean you cannot show values in the lblMsg?
ZeeshanAnsar...
Participant
878 Points
264 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 01, 2013 11:07 AM|LINK
yaa exactly ... can you look into this? why message doesn't display.
Please 'Mark as Answer' if this post helps you.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Message does not display after importing bulk records in asp.net
Jan 02, 2013 12:15 AM|LINK
So you mean this doesn't work properly on Server but well on local host?
If yes, can you again tell us how you deploy your web application?
Is that of Web Application or a Web Site?