Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Using UI object on a background worker

I'm writing an application on vb.net 2017 that read data from an excel file and after save them on a database.

My application works correctly , but I've noticed that when I read and work with very large data , I get the ContextSwitchDeadlock error.

So i'm thinking of using a Background worker. The problem is that on my form I have a spreadsheet object , that is filled with data from an excel file , and after I read from this object and create and save data to database.

So in my background worker I need to use the spreadsheet object.

How can I do that ?

Thank you !

Comments