Testing a DB connection

Alex Adams alex at a2technology.com
Wed May 26 12:50:48 EDT 2010

Does anyone have a simple technique for testing to see if a DB connection is
still functioning before trying to use it to execute some SQL?

I have an app that accesses hosted databases directly (postgres).  Users
logon at app startup.  If they let the app sit for long enough, the
connection to the DB server is dropped.  This is reasonable, but I want a
simple way of testing to see if the connection has been dropped and if it
has to reestablish the connection transparently before executing SQL

I need a simple isDBStillThere handler.  Is anyone doing anything similar?

Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
alex at a2technology.com

More information about the Use-livecode mailing list