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/

Reply via email to