2017년 6월 2일 금요일

acessing to WEB Database - How can I do it properly


I do a project, getting datas from my server to the App there processing the datas offline and syncronizing when online.

I followed http://puravidaapps.com/mysql.php

mysql.aia
mysql.php

And I looked at https://puravidaapps.com/filebyfile.php
FileByFile.aia
FileByFile_Drive.aia

I have a runQuery And I managed to get datas from my server. But with several problems:

1. I found, that when I open the app, the first call is not executed or answered. Nothing happens. I Do not know why.
2. Sometimes the call gave a empty result same call later or earlier gave a correct result.
3. Greatest problem is, that I have to wait for the result to go on with my programm. See:

Call from web for a list (Sending to runquery, waiting for Web1.response. Saving the data to tinydb.)
when list received go on and display the list. (getting from Tinydb and display)
This should work in one block. (except runquery and web1response)

And I looked at https://puravidaapps.com/filebyfile.php: It works, but by calling the next call after finishing the first. That might be a way.

I have allways the problem, that the Datas from the web are not allways filled properly to the tinyDB. Then I got an empty Item and an error message.  I think because auf time problems.

So how can I let wait the block for the result?
Is there a solution or explication for exchanging datas from WEB Database and TinyDB.

Note. The app should work without regular Internet and with slow connection!

--
Have you seen the Waiting and Timing section of this FAQ?

If that doesn't help, post your relevant blocks images here.

-- 

And I looked at https://puravidaapps.com/filebyfile.php: It works, but by calling the next call after finishing the first. That might be a way.

exactly this you have to do if you work with asynchronous methods

-- 

댓글 없음:

댓글 쓰기