Re: How to check if a connection is alive ?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: How to check if a connection is alive ?
Дата
Msg-id 200401140906.19042.dev@archonet.com
обсуждение исходный текст
Ответ на How to check if a connection is alive ?  (Andreas <maps.on@gmx.net>)
Список pgsql-odbc
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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Andreas
Дата:
Сообщение: How to check if a connection is alive ?
Следующее
От: Didier Quintard
Дата:
Сообщение: ODBC driver on Windows XP Pro