Hi
From the moment I have threaded a function that loads data from the db , I
get the following error:
An unhandled exception of type
'System.Runtime.InteropServices.InvalidComObjectEx ception' occurred in
system.data.dll
Additional information: COM object that has been separated from its
underlying RCW can not be used.
I searched a bit on this error and saw that it could have something to do
with Marshal.ReleaseComObject but I'm not using this.
If I wait until the thread has done running and restart the thread again,
all works fine, but this thread has to be restart the moment I click a
button.
Currently I 'm stopping the running thread with .Abort() and catching the
threadabortexception , I think this has something to do with the error I'm
getting as I suspect .Abort() is not the good way to go.
Does anyone know how I could solve this?
Thanks.