PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Losing connection to HFSql-server on ios
Losing connection to HFSql-server on ios
Débuté par zwaailicht, 28 avr. 2018 17:26 - 1 réponse
Membre enregistré
15 messages
Posté le 28 avril 2018 - 17:26
Hi All

I am developping an app for ios and android.
The app is working fine, but if the app moves to the background or the ios-device is going on standby, I lose connection.

When switching back to the app, and accessing the HFSQL, I get an error telling the connectiong to the server is lost.

I am struggling how to use ReConnect().
The code is :

PROCEDURE ConnectCentral() : boolean
lbResult is boolean = False

:SetCentral("BSS_GENERAL")

lbResult = HOpenConnection(:cnCentral)


// Connectie instellen
IF lbResult THEN
//HChangeConnection(BOODSCHAPPEN,:cnCentral)
HChangeConnection(COMPANY,:cnCentral)
HChangeConnection(HELP,:cnCentral)
HChangeConnection(MYSTORE,:cnCentral)
HChangeConnection(RUBRIEK,:cnCentral)
HChangeConnection(USERS,:cnCentral)
HChangeConnection(WINKEL,:cnCentral)
END

Maybe somebody can give me some advice :)

Regards,
Hans
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 30 avril 2018 - 16:56
Hi zwaailicht

Theres a code on the project tab.

There are events like Background and foreground

on the background code put the reconnect function or procedure, also on the focusgain event code of your windows use the reconnect that could help too.

best regards
Jose