S
Sylvain Ross
Hi,
I've looking around for canceling the filling of a dataset with the :
da.fill(ds,"blah") with da a SqlDataAdapter and ds a dataset.
I tried to do from a different thread : da.SelectCommand.Cancel, but it
doesnt work.
I also tried to run the da.fill(ds,"blah") from a different thread and
then to kill this thread from my main thread, but it doesnt work (even
if I do a myFillingThread.Abort(), it keep doing the filling. When the
filling is done, then the thread is killed, but not while doing the
filling).
If anyone know how to do this, should be great.
If anyone can confirm me that this is not possible, should be even great
(not as much great as the solution though )
I'm using SQL Server 2000.
I had the idea to try to get the pid of the SELECT command filling the
dataset and then to kill it through SQL Server sp_kill command, but I
don't have an easy way to get the pid of the select command of my
dataAdapter when runing it. Anyway this is a bit too "hacky" for me.
I've looking around for canceling the filling of a dataset with the :
da.fill(ds,"blah") with da a SqlDataAdapter and ds a dataset.
I tried to do from a different thread : da.SelectCommand.Cancel, but it
doesnt work.
I also tried to run the da.fill(ds,"blah") from a different thread and
then to kill this thread from my main thread, but it doesnt work (even
if I do a myFillingThread.Abort(), it keep doing the filling. When the
filling is done, then the thread is killed, but not while doing the
filling).
If anyone know how to do this, should be great.
If anyone can confirm me that this is not possible, should be even great
(not as much great as the solution though )
I'm using SQL Server 2000.
I had the idea to try to get the pid of the SELECT command filling the
dataset and then to kill it through SQL Server sp_kill command, but I
don't have an easy way to get the pid of the select command of my
dataAdapter when runing it. Anyway this is a bit too "hacky" for me.