Quote from PaulJonestindall on December 9, 2021, 11:12 amWhen opening a database you receive the variable [ID.$Status] as being "Connected".
If you lose your network connection to the database, say if your WiFi drops out, at what point if at all, does this variable indicate "Not connected"?
In other words, does this variable ever change once the database is opened?
Is there a way to refresh this variable or the database once it loses its connection? Would it make a difference if the CursorLocation = Server or Client?
When opening a database you receive the variable [ID.$Status] as being "Connected".
If you lose your network connection to the database, say if your WiFi drops out, at what point if at all, does this variable indicate "Not connected"?
In other words, does this variable ever change once the database is opened?
Is there a way to refresh this variable or the database once it loses its connection? Would it make a difference if the CursorLocation = Server or Client?

Quote from PaulJonestindall on December 10, 2021, 1:56 pm@vadim
I have tried any number of situations short of having to just close to program and restart it. I've determined that once the database is open and connected the [ID.$Status] variable will not change unless you deliberately close the database (dbpCloseDatabase). In that case all properties, relationships, etc. have to be reestablished. I'm trying to get this to happen automatically and I was hoping the [ID.$Status] variable would be key. But I guess not.
I have tried any number of situations short of having to just close to program and restart it. I've determined that once the database is open and connected the [ID.$Status] variable will not change unless you deliberately close the database (dbpCloseDatabase). In that case all properties, relationships, etc. have to be reestablished. I'm trying to get this to happen automatically and I was hoping the [ID.$Status] variable would be key. But I guess not.

Quote from Vadim on December 10, 2021, 7:24 pm@pauljonestindall
I guess I don't understand the problem you are facing yet. If the database is unavailable, the variable will show it. And if it is available, it will show this information. I usually use this variable before commands to search or write to the database. Just in case. But since the database file is local, the program does not lose communication with it.
I guess I don't understand the problem you are facing yet. If the database is unavailable, the variable will show it. And if it is available, it will show this information. I usually use this variable before commands to search or write to the database. Just in case. But since the database file is local, the program does not lose communication with it.
Quote from PaulJonestindall on December 10, 2021, 8:09 pm@vadim
Here's my situation, I have a small touchscreen in my lab for collecting test data. It's connected to a database file on a shared drive network through Wi-Fi.
Lately, the Wi-Fi keeps going out for just a few seconds. It causes the table grid (dbpShowGrid) to go blank. I've placed a text box object on the screen showing the [ID.$Status] variable. I've used the variable when trying to connect to a database but once it's connected, I have never seen that variable change. There is no dbp action to make it check the connection so it leads me to think the only actions that trigger this variable is dbpOpen and dbpClose.I've had to use a button action script to manually reset the program.
Here's my situation, I have a small touchscreen in my lab for collecting test data. It's connected to a database file on a shared drive network through Wi-Fi.
Lately, the Wi-Fi keeps going out for just a few seconds. It causes the table grid (dbpShowGrid) to go blank. I've placed a text box object on the screen showing the [ID.$Status] variable. I've used the variable when trying to connect to a database but once it's connected, I have never seen that variable change. There is no dbp action to make it check the connection so it leads me to think the only actions that trigger this variable is dbpOpen and dbpClose.
I've had to use a button action script to manually reset the program.

Quote from Vadim on December 10, 2021, 8:22 pm@pauljonestindall
Perhaps this variable is updated when we access it from the script. Try a timer to get information from this variable to another variable (e.g., [Status]). And put this other variable on the screen for observation. Just this code on the timer (the timer itself can be set to 1 second intervals):
SetVar "[Status]" "[ID.$Status]"
Perhaps this variable is updated when we access it from the script. Try a timer to get information from this variable to another variable (e.g., [Status]). And put this other variable on the screen for observation. Just this code on the timer (the timer itself can be set to 1 second intervals):
SetVar "[Status]" "[ID.$Status]"