Cancel a pivottable query

  • Thread starter Jan Kristian Bjerke
  • Start date
J

Jan Kristian Bjerke

I use vb.net and owc11. I want the user to be able to cancel a query in the
pivot table by clicking a button. Is this possible? I have tried to run
AxPivotTable1.Connection.Cancel() from another thread, but it hangs until the
query is complete. Can anyone help me?

Jan Kristian
 
J

Jan Kristian Bjerke

Beacause the main thread hangs until the pivot table is done. Thus the
cancel button event will not fire until the pivot table have completed the
query.
Any ideas how to do this?

Thank you for the help.

Jan Kristian
 
A

Alvin Bruney [MVP]

yup i understand the reason for the main thread hang, I'm almost sure that
the child thread you are using won't stop the query because it is not the
same context. Thinking about this, even though the child thread was able to
terminate the query on the MDX cube it might possibly be a rude abort in
which case the original client request would still hang and time-out instead
of immediately returning.

What i think you should do, is call the query asynchronously. You can then
call cancel and not have to wait based on the assumption that the cancel
call will always succeed.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top