data set fill causes app hang

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

when i have a dataset with 100,000 records (all new) and try to update it
back to the sql server 2000 database server it causes a application hang
(because it stops processing messages) until it is finished... is there any
way i can turn this update from the data adapter into a background process
in a thread so it doesnt do this? i tried putitng it into a thread and
didn't seem to do anything but the same thing as it did outside of a
thread... does anyone know of a way to keep the app from hanging while the
data set gets pushed back to the database? thanks

also is there any way to get the progress of an update back to the database?
a large update process like 100,00 records takes some time, i'd like to have
some show of progress on screen.. thanks!
 
I see you foudn the answer but I'd like to offer my opinion if I may.
100,000 records is 'too' much . You can do a few things to make it better,
but even with a background thread - you're not making it any faster you're
just keeping it from blocking. Instead, I'd pull over smaller blocks and
each time the user needs a records that's not there, pull over another
block. This will have the same effect in many ways as another thread but
will give you much better performance and won't eat up memory like 100,000
records will. Also w/ update, you can use the OnRowUpdated event to get
info back and update a progress bar.

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
 
well this app is a file importer, so it will load huge data sets into the
local machine, process them then push them back to the database server...
and running on a server that has 4 processors and 4GB of memory, so that
isn't a huge problem... just needed a way to get some sign of progress back
to the system :)
 
Back
Top