CPU usage 99% (aspnet_wp.exe) while importing excel sheet

V

Vivek

Hi all,
I am trying to import data from an excel sheet to MSSQL server 2000
using a web application (C#).
Since I have to validate the data in the excel sheet, the approach i
have used is to get the data from the excel sheet in a datatable in my
excel sheet.
For this i have used an ODBC connection and selected the contents from
my excel sheet. Through the data adapter got it into a datatable.
CLOSED THE ODBC CONNECTION.
Validated the datatable entries.
And then with an SQL connection, i have inserted it into SQL server
2000.
I have used the using block for entering data into my sheet. So that
the sql connection is closed as soon as the database is updated.
The excel sheet has some 500 odd entries. Most of them in string
format.
Some fields are as long as 500 characters.

After running this application on my system, after some time the
application hangs. When I check the task manager, it shows that
aspnet_wp.exe is utilising 99% of the CPU.

Please note that I am not using string concatenation in my
application.

Looking forward to some help on this issue.

regards,
vivek
 
V

vivekbg

Hi all,
I have solved the issue.
It was a terrible little piece of code, an infinite while loop!
Its working great now.(so next time u face a problem like this, the
first thing u can do is go through the entire code).

vivek.
 

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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top