Alex,

I think i've recommended before that you get 'Programming ADO' by David
Sceppa
There is a whole section on the ADO connection object - I don't know if what
you are experiancing is a 'feature' of ADO or of ADOExpress however I would
point out that
ADO has by default a 15second connection To so checking every 10 might be
optimistic

The only thing I can suggest is that connecting an disconnecting is not a
good way to
check for the existance of a server

TTFN
Neven

----- Original Message -----
From: Alex Kouznetsov <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, 17 October 2000 02:01
Subject: Re: [DUG]: ADOConnection connects when it is impossible


> Neven
>
> delay does not help. Just seems to be one of those little ADO "features".
>
> Alex
>
> ----- Original Message -----
> From: "Neven MacEwan" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Monday, 16 October 2000 13:04
> Subject: Re: [DUG]: ADOConnection connects when it is impossible
>
>
> > Alex
> >
> > looking at it GetConnected calls WaitForConnectComplete
> >
> > which is
> >
> > procedure TADOConnection.WaitForConnectComplete;
> > begin
> >   if Assigned(ConnectionObject) then
> >     while (ConnectionObject.State = adStateConnecting) do
> >       Application.ProcessMessages;
> > end;
> >
> > youll note that this might skip thru if ConnectionObject is unassigned -
> I'm
> > wondering a pause beween
> > Connected := true and if Connected.. is required
> >
> > TTFN
> > Neven
> >
> >
> >
> > ----- Original Message -----
> > From: Alex Kouznetsov <[EMAIL PROTECTED]>
> > To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> > Sent: Monday, 16 October 2000 14:37
> > Subject: Re: [DUG]: ADOConnection connects when it is impossible
> >
> >
> > > SQLOLEDB.1
> > >
> > > Alex
> > >
> > > ----- Original Message -----
> > > From: "Neven MacEwan" <[EMAIL PROTECTED]>
> > > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> > > Sent: Monday, 16 October 2000 10:29
> > > Subject: Re: [DUG]: ADOConnection connects when it is impossible
> > >
> > >
> > > > Alex
> > > >
> > > > Which providor are you using?
> > > >
> > > > Regards
> > > > Neven
> > > >
> > > > ----- Original Message -----
> > > > From: Alex Kouznetsov <[EMAIL PROTECTED]>
> > > > To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> > > > Sent: Monday, 16 October 2000 13:06
> > > > Subject: [DUG]: ADOConnection connects when it is impossible
> > > >
> > > >
> > > > > I have a little program which every 10 seconds connects to a
remote
> > SQL
> > > > 7.0
> > > > > server and runs some queries. Then it disconnects.
> > > > >
> > > > > If I suddenly unplug network cable and make that SQL server
> > unavailable,
> > > > > ADOConnection still manages somehow to connect. Or it rather
thinks
> it
> > > got
> > > > > connected. Eg. it does not throw an exception and sets Connected =
> > TRUE.
> > > > > Obviously following queries fail (timed out) as there is no server
> > > > > available.
> > > > >
> > > > > Next timer initiated connection attempt again goes well, eg.
> > > ADOConnection
> > > > > thinks it is connected and only following queries failures
indicate
> it
> > > was
> > > > > not the case.
> > > > >
> > > > > Only on the 3rd connection attempt ADOConnection figures out that
it
> > > > cannot
> > > > > actually do it and throws an exception.
> > > > >
> > > > > What is this ?
> > > > >
> > > > > Regards
> > > > > Alex
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
> --------------------------------------------------------------------------
> > > > -
> > > > >     New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> > > > >                   Website: http://www.delphi.org.nz
> > > > > To UnSub, send email to: [EMAIL PROTECTED]
> > > > > with body of "unsubscribe delphi"
> > > > >
> > > >
> > >
> >
>
> --------------------------------------------------------------------------
> > > -
> > > >     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> > > >                   Website: http://www.delphi.org.nz
> > > > To UnSub, send email to: [EMAIL PROTECTED]
> > > > with body of "unsubscribe delphi"
> > > >
> > >
> >
>
> --------------------------------------------------------------------------
> > -
> > >     New Zealand Delphi Users group - Delphi List -
[EMAIL PROTECTED]
> > >                   Website: http://www.delphi.org.nz
> > > To UnSub, send email to: [EMAIL PROTECTED]
> > > with body of "unsubscribe delphi"
> > >
> >
>
> --------------------------------------------------------------------------
> -
> >     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> >
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to