ODBC SQLCAncel.... Equivalent....

  • Thread starter Thread starter Allen Smith
  • Start date Start date
A

Allen Smith

My query returns huge data to the end user. What is the syntax to cancel the
query.... I am using ADO.Net (Data Reader) and .Net Framework 1.1.
Thanks,
Smith
 
Hi Allen,

There is no async mode in a current version of ADO.NET and you cannot cancel
query. But when you call your query you probably know what it does and, I
believe, you could narrow selection at this moment of time using WHERE
clause. Another way is to design application that way that all the
manipulation of the data could be done on a server side inside of SP. In
this case it will be batch manipulation and should work faster
 
Ah no. The ADO.NET Command object supports a Cancel method.
You MUST use the Cancel method before closing a DataReader that's returning
too many rows or ADO.NET will step through the rowset anyway (which can take
considerable time).



--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top