pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Andreas <maps.on@gmx.net>
To: pgsql-odbc@postgresql.org
Subject: Re: How to check if a connection is alive ?
Date: Wed, 14 Jan 2004 09:06:18 +0000
Message-ID: <200401140906.19042.dev@archonet.com> (raw)
In-Reply-To: <4004B79A.9030709@gmx.net>
References: <4004B79A.9030709@gmx.net>

On Wednesday 14 January 2004 03:29, Andreas wrote:
> Hi,
>
> Access 2000
> Postgresql 7.4.1
> newest PG-ODBC
>
> how can I check if a DAO- or ADO-connection is still alive ?
> I'd like to maintain a connection to a remote PG server within my VBA code.
> It should be opend when the users start the application and closed when
> the app terminates.

You could have a timer that calls a function that just runs "SELECT true" or 
similar. If the query fails, you've lost your connection. Is that the sort of 
thing you meant?
-- 
  Richard Huxton
  Archonet Ltd



view thread (2+ messages)

Message-ID: <200401140906.19042.dev@archonet.com>
Permalink:  ../200401140906.19042.dev@archonet.com/
Also on:    postgresql.org/message-id/200401140906.19042.dev@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: dev@archonet.com, maps.on@gmx.net
  Subject: Re: How to check if a connection is alive ?
  In-Reply-To: <200401140906.19042.dev@archonet.com>
  References: <4004B79A.9030709@gmx.net> <200401140906.19042.dev@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox