NeoDBPro Connection Status - Forum

Forum Navigation
You need to log in to create posts and topics.

NeoDBPro Connection Status

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?

@pauljonestindall

You can create all these situations and see what happens to the variable :)

@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.

@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.

@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.

@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]"