X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2FC9ED1D82F for ; Wed, 14 Jan 2004 03:27:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 99888-07 for ; Tue, 13 Jan 2004 23:26:43 -0400 (AST) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id B12E5D1B44A for ; Tue, 13 Jan 2004 23:26:38 -0400 (AST) Received: (qmail 8689 invoked by uid 65534); 14 Jan 2004 03:26:42 -0000 Received: from p508BE4F8.dip.t-dialin.net (EHLO gmx.net) (80.139.228.248) by mail.gmx.net (mp018) with SMTP; 14 Jan 2004 04:26:42 +0100 X-Authenticated: #14269776 Message-ID: <4004B79A.9030709@gmx.net> Date: Wed, 14 Jan 2004 04:29:30 +0100 From: Andreas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.5) Gecko/20031007 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: How to check if a connection is alive ? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/20 X-Sequence-Number: 3649 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. There are longer times while the application is idle and then some times when it hits the server very often. E. g. I write a log in the DB where the app says who did when what. I'd prefer not to strain the server and the LAN with permanent Conn Open/Close sequences. There will be at least one external user who enters the LAN via a SSH tunnel over the internet. This connection is naturally worse in responsivity than the internal LAN and there are chances that the tcp/ip connection breaks or the ODBC times out. If Access runs into a stale connection it plays dead until it's ODBC timer runs out and that can take a while. It would be better if I could check somehow wether the connection is still there, before sending a command over it. Is there a way to do that ?