Cancel Fill Operation

  • Thread starter Thread starter Rex the Strange
  • Start date Start date
R

Rex the Strange

Hi All,

Help please. How can I cancel the Fill operation of an
OracleDataAdapter? I have the fill running in a different thread so I
can invoke an event while it is running, but nothing seems to actually
stop it. I've tried killing the thread, destroying the object, closing
the connection, using DataAdapter.SelectCommand.Close () - nothing
works! It seems like any command I issue is waiting for the fill to
complete.

There must be a way to stop the hideous beast!

Please help!!!!!!!!!!!!!!!!


AAAAAAAAAAAaaaaaaaaaaagggggggggghhhhhhhhhhh!!!!!!!!!!!!!!!!!!


rts.
 
Sorry, I meant: DataAdapter.SelectCommand.Cancel ()


See? It's turning my brain into mash!!

rts.
 
First, I'm not an Oracle expert--but if the OracleClient .NET Data Provider
exposes BeginExecuteReader you can execute the _query_ asynchronously, but
this does not return a single row--you still have to download the rowset
yourself. If you take this approach you can cancel the async query operation
with the Cancel method. Of course, this assumes that the DBMS engine is in a
state that permits cancellation of a running process. SQL Server permits
this--but only some of the time. It also might take some time to stop the
operation so be patient. Once you start rowset population with your own
code, you might be able to use the Cancel method to stop the operation.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
Between now and Nov. 6th 2006 you can sign up for a substantial discount.
Look for the "Early Bird" discount checkbox on the registration form...
 
Back
Top