Good evening everybody,
I have the following code in a "window". If I use it, for example, five
time the code works fine but if I use this snippet of code one time, I
wait for 5 or 10 minutes, and I try to re-use it, the application remain
locked at HOpenConnection() call.
I have noticed that, on HFCC, the connections still remain visible in
Connection tabs despite I closed them with HCloseConnection().
The code below is semplified, I use it to syncronize a remote HF
database with the databese stored on the mobile device.
I hope I was clear and thank you in advance for answers.
remoteDatabaseConnection is Connection
remoteDatabaseConnection..Provider = hAccessHFClientServer
remoteDatabaseConnection..Access = hOReadWrite
remoteDatabaseConnection..Server = ggDBServer
remoteDatabaseConnection..Database = ggDBName
remoteDatabaseConnection..User = ggDBUser
remoteDatabaseConnection..Password = ggDBPassword
IF HChangeConnection(TABLE, remoteDatabaseConnection) THEN
IF HOpenConnection(remoteDatabaseConnection) THEN
HOpen(TABLE)
HClose(TABLE)
HCloseConnection(remoteDatabaseConnection)
HChangeConnection(TABLE, "")
HOpen(TABLE)
ELSE
Info("...")
END
ELSE
Info("...")
END