Is IWorkspace.ExecuteSQL synchronous or asynchronous?

3041
4
09-21-2015 05:31 PM
MarkMindlin
Frequent Contributor

Desktop 10.3

I cannot find in documentation an answer for that.

And secondly, can I change that method to be synchronous/asynchronous?

Any documentation link or idea?

Was this method asynchronous in previous versions?

0 Kudos
4 Replies
FreddieGibson
Honored Contributor

The method should be synchronous because it blocks the UI thread when you call it. Have you tried wrapping it within an asynchronous method? Examples of how to do this are available on the following pages:

Calling Synchronous Methods Asynchronously

https://msdn.microsoft.com/en-us/library/2e08f6yc(v=vs.110).aspx

Create an Asynchronous Method

http://www.csharp-examples.net/create-asynchronous-method/

MarkMindlin
Frequent Contributor

Thanks Freddie,

Thank you for response.

Good suggestion.

Was this method asynchronous in previous versions? (before 10.3)

0 Kudos
FreddieGibson
Honored Contributor

I don't believe this method was ever asynchronous.

MarkMindlin
Frequent Contributor

Thank you Freddie,

Probably do you have an idea why execution of a procedure with this method blocks the table to which the procedure writes (meaning - I cannot read the table when procedure is executing)?

0 Kudos