Trying to upload an Excel file and process it.

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.
 
G

Gregory A. Beamer

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! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top