Trying to upload an Excel file and process it.

  • Thread starter Thread starter Mr.Magic
  • Start date Start date
M

Mr.Magic

I have an Excel file that have about 40,000 rows in it that I need to import
into a SQL Server table. I have the code to read the Excel spreadsheet. I
have the code to spin through it and add the records to SQL Server. The
problem is it takes so long to process all of these records that the page
times out.

I was thinking about do Ajax and doing partial page feedbacks. The problem
is that if I put the FileUpload object in an UpdatePanel, when you click
upload, HasFile for that object comes back false.

One other problem is that the Web server and the SQL Server are on different
networks so they are going through a VPN which is not the fastest thing
around.

Anybody have any suggestions?

TIA - Jeff.
 
I have an Excel file that have about 40,000 rows in it that I need to
import into a SQL Server table. I have the code to read the Excel
spreadsheet. I have the code to spin through it and add the records to
SQL Server. The problem is it takes so long to process all of these
records that the page times out.

I was thinking about do Ajax and doing partial page feedbacks. The
problem is that if I put the FileUpload object in an UpdatePanel, when
you click upload, HasFile for that object comes back false.

One other problem is that the Web server and the SQL Server are on
different networks so they are going through a VPN which is not the
fastest thing around.

Anybody have any suggestions?

Separate out the problems. You have the upload mechanism. Does the user
have to wait for upload to finish prior to doing anything else? If not, do
the pull asynchronously and add some code to inform the user when it is
done.

AJAX does not solve the problem, per se, it just shifts it to an asynch
method of updating the UI. You can still end up timing out if AJAX is your
solution to the upload and process problem.

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top