Android Question BATCH Upload with jobX.Download2

kohle

Active Member
Licensed User
Hi,

I use the following code

Dim job2 As HttpJob
job2.Initialize("Job2", Me)
job2.Download2("http://www.xxxxxxx.com/insert.php",arr)

This works fine , I get an success info in JobDone

Now I need to do this about 50 times with different data. I have the data in a list.
When successfully a job2.Download2 was made, I want to delete the item from my list
and make the next job2.Download2.
When not successfully than stop.

How I can do this ?

Thanks
 

DonManfred

Expert
Licensed User
Start the first job
In JobDone you check if the upload was ok or not. when ok you remove the first job from your list and then start the first job of the list (if there is a entry in the list)

BUT if we just talking about data (no binaries) then you can use multiple dataentries in ONE postrequest...

See my example on Creating an dynamic pdf using b4a<->php

You can see the principle i´m using there...
I have a list of Maps and post all this in one request tot the php and the php extracts the list and get the maps out of it.

So, instead of 50 calls you can use one call (if you php is designed to accept this) to transmit all.
 

kohle

Active Member
Licensed User
Start the first job
In JobDone you check if the upload was ok or not. when ok you remove the first job from your list and then start the first job of the list (if there is a entry in the list)

BUT if we just talking about data (no binaries) then you can use multiple dataentries in ONE postrequest...

See my example on Creating an dynamic pdf using b4a<->php

You can see the principle i´m using there...
I have a list of Maps and post all this in one request tot the php and the php extracts the list and get the maps out of it.

So, instead of 50 calls you can use one call (if you php is designed to accept this) to transmit all.

Thanks a lot DonManfred,
the first idea, I had too, but had an error in my script in the jobdone event (Missing RETURN) . Now it works fine.

Using JSON is a way, I will check.
 
Top