Myles

I might be just right ! The thing hangs in there for about 1 to 2 minutes !
But then it finally gets disconnected.

This is not a very nice feature. Sometimes we need to do DB exclusive
operations such as restore. We disconnect all the modules and then perform
the operation.

Is there any way to force an immidiate disconnection ?

Thanks
Alex

----- Original Message -----
From: "Myles Penlington" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 1:26 PM
Subject: RE: [DUG]: ADO Connection does not seem to disconnect


> What about ADO/ODBC connection pooling holding the connection open for a
> period of time?
>
> -----Original Message-----
> From: Alex Kouznetsov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 22 August 2001 3:24 p.m.
> To: Multiple recipients of list delphi
> Subject: [DUG]: ADO Connection does not seem to disconnect
>
>
> When my application starts, it connects to MS SQL2000 server, does some
job
> and then disconnects from the server.
> Application stays connected to DB anyway somehow. It can be seen using
> sp_who stored procedure.
>
> Here is an example.
>
> Application has a single form with TADOConnection on it and nothing else.
>
> Before application starts sp_who shows X connections.
>
> Then I have this code on Form Create event
>
> procedure TForm1.FormCreate(Sender: TObject);
> begin
>
> showmessage('About to connect');
> // sp_who shows X connections
>
> ADOConnection1.Connected := TRUE;
> showmessage('Connected');
> // sp_who now shows X+1 connections. Correct.
>
> ADOConnection1.Connected := FALSE;
> showmessage('Disconnected');
> // sp_who STILL shows X+1 connections !!!
>
> end;
>
> Once application closed sp_who shows X connections again....
>
> What is it ?
>
> 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"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> --------------------------------------------------------------------------
-
>     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"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>

---------------------------------------------------------------------------
    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"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to