G
Guest
One of my routines is running queries, with some of them taking several minutes. I would like the filling of the table to take place in a different thread and then just pass me the resultant table.
I can access the data just fine, but when I try to use the tables as a datasource there is an exception: "Controls created on one thread cannot be parented to a control on a different thread."
First, I tried creating the table outside the thread and then just filling it inside the thread. That didn't work, so then I tried cloning the table and then recreating all of the rows (which I don't want to do because sometimes the table has several hundred thousand rows). But that didn't work either.
What is the problem and how can I get around it (if possible, without recreating the whole table)?
I can access the data just fine, but when I try to use the tables as a datasource there is an exception: "Controls created on one thread cannot be parented to a control on a different thread."
First, I tried creating the table outside the thread and then just filling it inside the thread. That didn't work, so then I tried cloning the table and then recreating all of the rows (which I don't want to do because sometimes the table has several hundred thousand rows). But that didn't work either.
What is the problem and how can I get around it (if possible, without recreating the whole table)?