Multiple aSync nonQueries

mc73

Well-Known Member
Licensed User
Longtime User
Suppose I am creating a batch using a timer. Then, let's say I have another timer doing the same thing. I would like to have two batches instead of one, the one executed after the other.
Now, I know I can make the second timer wait until the execution of the first batch (for e.g. by waiting for a flag turned true at the end of execution of the first batch), still wouldn't it be useful to have some kind of distinct batches? As for e.g. we have a jobID at the httpUtils?
 

mc73

Well-Known Member
Licensed User
Longtime User
Yes, I've just created a small app (attached) so that I can confirm this. Batches are executed one after another. Accidentally though, I've noticed that if I include a doEvents in the populating subs, seems like the second batch is executed first. If I don't, then the two batches are being processed with the 'correct' order. Now, in ordinary life, this cannot be a problem, yet, if there is a connection between inserted data from the first batch, with the second, this won't work with doEvents, at least so it seems (you can check the logs). Anyway, all this can be handled easily, I'm quite happy that the two batches are distinct. Still a bit curious about how the OS handles the two doEvents, but not that important.
 

Attachments

  • asyncsqltimers.zip
    6.3 KB · Views: 197
  • logs.zip
    9.3 KB · Views: 162
Upvote 0
Top