Populating data set on background thread

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a master data set. I need to populate a copy of this data set in the
background (via background thread?) and once filled to replace master data
set with the newly filled dataset. Is there a code example of this that can
see?

Thanks

Regards
 
Hi Miha

Thanks. How does one switch datasets?

Thank again.

Regards

Miha Markic said:
You might check out BackgroundWorker component.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

John said:
Hi

I have a master data set. I need to populate a copy of this data set in
the background (via background thread?) and once filled to replace
master data set with the newly filled dataset. Is there a code example of
this that can see?

Thanks

Regards
 
John said:
Hi Miha

Thanks. How does one switch datasets?

There is no automatic way. Perhaps you could fill one in the background and
when it is full you could merge it with original (perhaps clear original one
beforehand). Just make sure that merging or whatever you do you do in form's
thread.
 
If you use a BindingSource to do the binding between your controls and your
data, you can just replace the data source of the binding source and it will
take care of repainting your controls.

RobinS.
GoldMail, Inc.
--------------------------------------------------------
 
One more thing. This is what I'm doing, and you replace the data source in
the event that gets fired when your thread completes its retrieval of the
new data.

RobinS.
GoldMail, Inc.
----------------------------------------------
RobinS said:
If you use a BindingSource to do the binding between your controls and
your data, you can just replace the data source of the binding source and
it will take care of repainting your controls.

RobinS.
GoldMail, Inc.
--------------------------------------------------------
 
Back
Top