B4J Question Best "Wait For" approach with ExecNonQuery

GuyBooth

Active Member
Licensed User
Longtime User
I want to execute a single ExecNonQuery statement asynchronously, so I obtain a success result.
As far as I can see, the only way to do this is to add the query to a batch and execute the batch like this:

B4X:
        ' Add the query to a batch so we can run async
        sqlMB.AddNonQueryToBatch(Query, lstArgs)
        ' Run the batch asynchronously
        Wait For (sqlMB.ExecNonQueryBatch("sqlMB")) sqlMB_NonQueryComplete (Success As Boolean)

All the other ExecNonQuery statements appear to be synchronous - or am I missing something?
 

MarkusR

Well-Known Member
Licensed User
Longtime User
would ExecQueryAsync work also if it not return a result set?
 
Upvote 0
Top