Last post Dec 03, 2010 12:50 AM by bhavik.y.shah
Dec 02, 2010 06:21 AM|juhi_it|LINK
In asp.net,when i m trying to update data in sql database from excel file it is showing error as given below.
Error:The CLR has been unable to transition from COM context 0x209cf8 to COM context 0x209e68 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation
without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment
(STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
please tell me what is the problem because when i tried to update data in dummy database(which contains only 10 records) its working properly and when m tried to update data in large database table(which contains 50 lakhs data its showing above error.)
update data in table from excel file.
Dec 02, 2010 09:08 AM|bhavik.y.shah|LINK
You are importing records from Excel to Db using programming right.
So I just want to know that you are inserting records one by one or full bunch of records.
If yes for bunch of records then please do care that may be the memory size is less for that records.
So you do one thing that insert bunch of records but not full excel sheet at a time I.e insert 500 or 1000 records at a time that will decrease performance but I think you can find you solution
Dec 03, 2010 12:50 AM|bhavik.y.shah|LINK
So that was the problem of memory right?
and use commite and rollback method in starting and at the end of the excell sheet insert data.
Because in between any error or exception occure then partial records will be inserted rest will be not.