Check if can connect to SQL database - script step
My FMP connects to an external mySQL database using the actual technology driver. Works great.
However, my ISP changes my IP address erratically (!) and so I'm forever needing to whitelist my IP so I can connect to the database.
I'm looking for a way to check if the connection exists before going to the layout that will show the external data. This is to avoid 10 - 15 minutes of beach-balling while a non-connection occurs and <data missing> appears in all the fields. Id like to only whitelist when I have to rather than every day.
I've tried get(lasterror) and get (ODBCerror), but they get returned as empty just before the beachballing starts even if it cant connect.
Any way to do this so I can trap the script before the beachballing occurs?