New function: check.dbserver.<NAME>

Would it be possible to implement a function that checks the connection to a db sever if it is reachable or not ?

I am working with a lot of different servers in my solution ( local & web based ) and have the problem that sometimes some servers are not reachable, wich could be critical for some methods.

I would like to see a new function like:

check_dbserver.NAME

possible results = 0 and 1

0 = Server not reachable
1 = connection established

It would be used like this…

if ( check_dbserver.MYSQL_ONLINE = 0)
{ return “Error - Server not respondig”;
}

else
{ ..rest of the method…
}

Rainer

In a normal env. the db engine is always present (or you are in trouble with the solution any way, becouse you cannot know when a valuelist for example is loaded)
In the admin page it is possible to enter a validation query which checks if a database connection is still valid before getting used, if idle in the server connection pool.
on databaseManager there is a function getTable(servername,tableName) if that returns null you know there is a problem.
If you really need a function to check if a database can be reached let us know.