How to Cancel Linq Query

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
in4matiger
Posts: 4
Joined: Tue 25 May 2010 12:43

How to Cancel Linq Query

Post by in4matiger » Mon 09 Aug 2010 06:49

Hi,

It's possible to cancel a linq query?
If I use a OracleCommand and DataReader I can send a cancel().

I try
var Artikel = Manager.V003MATCH.AsParallel().WithCancellation(cs.Token);
the query is canceled to late

Regards

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 10 Aug 2010 11:56

We will investigate the possibility to add the requested functionality.
I will post here about the results of our investigation.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 14 Dec 2010 12:57

We do not plan to add query canceling.
You can cancel materialization in the following way:

Code: Select all

      var query = from m in db.master select m;
      bool cancelRequested = true;
      foreach (var m in q) {
          if (cancelRequested)
              break;
      }

Post Reply