Sub Activity_Create(FirstTime As Boolean)
'i know i can use firsttime - this is an example so don't use all space of community
SERVERON=False
'not connected yet...
connect2db
end sub
Sub connect2db
db.DisableReconnect
'let's try
db.Initialize("MySQL","myipormyhost:myport","myusername","mypass","mydatabase")
End Sub
Sub MySQL_Status(Connected As Boolean, ReConnecting As Boolean, RetriesLeft As Int)
Log($"Connected = ${Connected}"$)
If Connected = True Then
'if connected then open table...
db.QueryASync("select.....blahblah;","nameofjob")
'enable reconnect!!!!
db.EnableReconnect
SERVERON=True
Else
'try reconnection
SERVERON=False
connect2db
End If
End Sub