PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WDM21 - Sql Server
WDM21 - Sql Server
Iniciado por guest, 27,ene. 2018 08:24 - 3 respuestas
Publicado el 27,enero 2018 - 08:24
I am needing help

im still new to developing in windev mobile and dont know what to do now.

i had an app that read data from a local hfsql database on the android device and returned information to the user, to then be used to push data to our sql server backend.

i was informed that having the data locally on the device is unacceptable (after i built it) and MUST be pulled from our sql server. there is to be no data on the device other than what has been pulled remotely. and once the data has been pushed out to the backend the device must delete the data it pulled remotely.

What can i do?
Publicado el 27,enero 2018 - 14:51
Hi Elisha,

well, you can do exactly what they are asking for:

1. Test if data connection is available (InternetConnected)
2. if not, message the user saying: no connection, no work
3. if connected, call a webservice (httprequest for a REST type webservice, with an awp page on the other side, by example) to get the necessary data (I hope that is not too much data or they will be a looooong wait)
4. Store the data in the way that you will need it/that you can use it. It can be in a DB file on disk, but also simply in an array of structure in memory. This depend of the amount and type of data.
5. FINALLY do the work your app is supposed to do
6. Call your webservice to send the results
7. Delete local data (method depends on the choice made in 4)

All done

Best regards
Publicado el 28,enero 2018 - 09:55
Spectacular!

this has helped me greatly, Thank You!

i do have a question, is it possible to allow the webservice supplied with windev mobile to handle the database login (user and pass) so i dont have to "hard code" it into my app?
Publicado el 02,febrero 2018 - 06:31
Any thoughts on allowing the webservice to handle the database login?