Android Question RDC, how to pause execution until Job Done?

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I have a following codes in RDC
B4X:
Sub btnConnect_Click
    reqManager.Initialize(Me, ConTxt.Text)
   
    ExecQ("select_fngd")
    Do_Process   
End Sub

Sub ExecQ need sometimes to return values. Sub Do_process need these values for other process.

How to pause Sub Do_Process from execution until Sub ExecQ return values?

Thanks in advance.
 

incendio

Well-Known Member
Licensed User
Longtime User
Thanks for your replied.

If I call do_process in jobdone, when there is a failure in the connection, do_process will never call.

By calling do_process outside the jobdone, I can set in jobdone a boolean variable to true value and in do_process, waiting for specific amount of time for this variable value.

If after a specific amount of time, this variable never come to true value, then I can tell users that there is something wrong with the connection.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Thanks for your replied,

So, just like Manfred said, the process must be call inside JobDone, no other way to pause the excecution and wait for a return in JobDone event?

If I have 1000 data to insert, and during the insert, the connection in broken, Job.Success = false will be triggered, right?
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
That is not correct. JobDone should always be raised. Job.Success will be False if there was an error.
Dear Erel,

Just testing this, and I got return Job.Success = false while it actually success.

Inserted a record, from server console, it took 44195ms.
JobDone on Android device return false, but when I checked on database server, data inserted ok.

I believe, JobDone waiting for a specific amount of time to get result (success or fail), any change to increase this waiting time?
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…