Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel

[Imported] ClearScada.Client.Advanced.IQuery.ExecuteAsync

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Janeway Janeway

[Imported] ClearScada.Client.Advanced.IQuery.ExecuteAsync

>>Message imported from previous forum - Category:Scripts and Tips<<
User: mchartrand, originally posted: 2018-10-25 18:44:38 Id:270
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.


I am looking for some example code of how to use the following method:
I have successfully used the following method:
I do not understand how to access the QueryProgressEventArgs or QueryCompleteEventArgs from the event handlers.
Can anyone provide an example please?
For reference I have a question on Stack Overflow with full details:
[https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties](https://stac... "https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties")_**


The QueryProgressEventArgs I expect will only be a % complete indication unless you've called the ExecuteAsync with the ClearScada.Client.Advanced.QueryExecuteOptions.ReturnIncrementalData option.
Even then it's likely this isn't implemented, but is intended for the future...

I haven't tried using the Async methods.
If it really got down to it, you could always try doing a deep copy of the object into something else within your actual process and then setting a breakpoint after the query completes to inspect what was returned with each callback.

I would have expected the QueryCompleteEvent to work, and to return the Result within the Result member (as long as the Exception isn't indicating a problem). Is this not the case?


Thanks for your response. I have done some further testing and updated my Stack Overflow question:
[https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties](https://stac... "https://stackoverflow.com/questions/47071810/how-to-access-custom-eventargs-properties")
The QueryProgressEventArgs seems to show the same messages as the query list view in ViewX:
Searched x records | Created x of y records | Fetching result set
I have exactly the same issue with the QueryCompleteEventArgs as I have with the QueryProgressEventArgs as described in the Stack Overflow question.
Everything seems to work I just can't access the progress or result._**