I might add that in a situation with many users the server will be much happier if one opens and closes the db more often than less.
On 26 May 2010 10:27, stephen barncard <[email protected]>wrote: > SELECT "any text" > > if you don't get a revDB error, it's there. But I've found there is > surprisingly little overhead in just opening and closing the database for > every query, unless one needs a rapid-fire sequence of queries. Then one > could program the open and close for the burst. > > > On 26 May 2010 09:50, Alex Adams <[email protected]> wrote: > >> 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 >> statements. >> >> I need a simple isDBStillThere handler. Is anyone doing anything similar? >> >> Thanks, >> -- >> Alex Adams >> >> hawkVision ‹ tools for solving Wicked Problems >> >> (a)2 Technology Partners, Inc. >> 831-726-8013 >> [email protected] >> hawkVisionInfo.wordpress.com >> universalConnector.wordpress.com >> >> _______________________________________________ >> use-revolution mailing list >> [email protected] >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-revolution >> > > > > -- > ------------------------- > Stephen Barncard > San Francisco > > -- ------------------------- Stephen Barncard San Francisco _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
