S
Sam
Hi,
When I load my form I start a new threads that creates a datareader,
which gets data from my database.
The problem is that I'd like to be able to abort the thread when
clicking on another button, otherwise there is an attempt at creating a
second datareader, while the thread is still running.
To do that I call myThread.Abort() on the click event of the button,
but for some reason instead of going from the Running state to the
Aborted state, it goes into AbortRequested state, and that's it! hence
the crash...
can you help?
When I load my form I start a new threads that creates a datareader,
which gets data from my database.
The problem is that I'd like to be able to abort the thread when
clicking on another button, otherwise there is an attempt at creating a
second datareader, while the thread is still running.
To do that I call myThread.Abort() on the click event of the button,
but for some reason instead of going from the Running state to the
Aborted state, it goes into AbortRequested state, and that's it! hence
the crash...
can you help?