🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.dbexpress
Article #110

Re: Test connection alive

#110
From: Jason Chapman
Date: Sun, 17 Oct 2004 16:42
29 lines
1965 bytes
Until you try and do something the DB component will not realise that 
anything has gone wrong.  You would have to do something to the connection, 
e.g. have a query running every few minutes with select cast('now' as Date) 
from rdb$database.  You would then get an exception when the connection went 
down and you could disconnect and reconnect.

Anyway - I would be concerned about not encrypting traffic over the 
internet.

JAC.


<yartax@hotmail.com> wrote in message 
news:4124d43c$1@newsgroups.borland.com...
> Hi everyone,
>
>
> How can I test if a Interbase connection is alive and reconnect if
> necessary? I make a BCB6 program to work with Interbase/Firebird servers.
> This program (client side app) uses ADSL to connect to servers, and
> connection can be lost at any moment. My idea is to put a TTimer component
> and test TIBDatabase->Active property every minute to check out, but 
> doesn't
> works Also tried to use a TIBEvents but I don't know how configure it.
>
>
> Thanks!
>
> 
Technical Details
Message-ID: <4172a0e1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4124d43c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,c8be712694efc016
X-Google-Attributes: gidfb4e2,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jason Chapman" <jason@nospamjac2.co.uk>
Newsgroups: borland.public.cppbuilder.database.dbexpress
References: <4124d43c$1@newsgroups.borland.com>
Subject: Re: Test connection alive
Date: Sun, 17 Oct 2004 17:42:40 +0100
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 80.229.46.222
Message-ID: <4172a0e1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098031329 80.229.46.222 (17 Oct 2004 09:42:09 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail