RE: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Ross Levis

Hello all.

Well, I tried Myles suggestion below and compared the list of modules used
and ... they are identical :(

I tried John's suggestion of turning on (detailed) map generation and
compared the 2 files...  they are identical :(

It seems impossible to me but there is a difference -- 686k v 648k.  Both
systems were installed only a couple of weeks apart and have the service
pack.  No path defaults were changed on either machine.  One machine has
RXLIBS installed but isn't used in the project.  I think I may have to
uninstall  reinstall on both machines and see what happens.

I did a FC on the 2 EXE files and they start to differ quite early on --
around 0110H.  I can send the 2 EXE's if anyone wants a challenge to
disassemble them.

Ross.

 -Original Message-
 From: Myles Penlington [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 21 August 2001 16:00
 To: Multiple recipients of list delphi
 Subject: RE: [DUG]: EXE filesize differences on 2 computers
 
 
 Here is my 2 cents worth ..
 
 My guess at this is quite simple - but harder to find. You 
 have somehow got
 an extra unit included - the trick is which one any why!
 
 My only thought on this would be if have some modified VCL 
 source compiled
 into the program, and a fresh install on another machine does 
 not have the
 same modified source.
 
 How can you check?
 
 Run the program with Debug DCU's and set a break point. Then 
 view the module
 debug window and select the program, this will then list all the units
 compiled into the program. You can copy the whole list and 
 then compare with
 a list from the other machine.
 
 Again once you (have hopefully) found the extra unit(s), you 
 then have the
 problem of finding which unit is responsible for including the extra
 unit(s).
 
 Myles.
 
 
 -Original Message-
 From: Neven MacEwan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 21 August 2001 3:02 p.m.
 To: Multiple recipients of list delphi
 Subject: Re: [DUG]: EXE filesize differences on 2 computers
 
 
 Nello
 
 It's a trap in support to avoid, always pointing the finger 
 at viruses, but
 in many cases they cause the inexplicable
 another thing to do is run fc and see at what point the 
 differences occur
 
 Then run debug and start tracing..maybe not
 
 Neven
 
 - Original Message -
 From: Nello Sestini [EMAIL PROTECTED]
 To: Multiple recipients of list delphi [EMAIL PROTECTED]
 Sent: Tuesday, 21 August 2001 14:12
 Subject: Re: [DUG]: EXE filesize differences on 2 computers
 
 
  From: Neven MacEwan [EMAIL PROTECTED]
 
   Have you checked the obvious - A virus tacked on the end?
 
 
  lol@ obvious
 
  i suppose it SHOULD have been obvious.  g
 
  good call.
 
  -ns
 
  
 --
 
 -
  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/
 
---
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/



[DUG]: Application.processmessages

2001-08-21 Thread vss

Hi All.

Has anyone got or know of a Lite version of appliction.processmessages ?
When I say Lite what I mean is, that I hav an COM DLL that I wrote that 
needs to use appliction.processmessages. BUT the proble3m is, that I need 
to include FORMS.PAS in the unit. With out it, 102kb...wit it 315kb !
ok, its not a  major thing, BUT it seems a lot of extra overhead I dont 
need.
I know I could extract the code I need from froms, but befoe I do, I just 
wanted to check that there was nothing elase around to save e a job.

Thanks, Jeremy Coulter


---
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/



RE: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Cheng Wei

Hi Ross,

Have you tried this yet - Compare all uses clauses of all units of one
project against the other, the reason for doing this is that if you have
dropped a component on your form and later on you decided to remove it, the
compiler will not remove the entry from the uses clause, then the
initialisation code of the unused unit will be compiled into your exe.

Regards
Cheng


#
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
For more information please visit www.marshalsoftware.com
#
---
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/



RE: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Ross Levis

Hi Cheng

All the project files are stored in one folder which was copied from one
computer to the other so all uses clauses will be the same.

Cheers,
Ross.

Cheng Wei wrote:

 Hi Ross,
 
 Have you tried this yet - Compare all uses clauses of all units of one
 project against the other, the reason for doing this is that 
 if you have
 dropped a component on your form and later on you decided to 
 remove it, the
 compiler will not remove the entry from the uses clause, then the
 initialisation code of the unused unit will be compiled into your exe.
 
 Regards
 Cheng
 
 
 ##
 ###
 This e-mail message has been scanned for Viruses and Content 
 and cleared 
 by MailMarshal
 For more information please visit www.marshalsoftware.com
 ##
 ###
 --
 -
 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/



RE: [DUG]: Application.processmessages

2001-08-21 Thread Patrick Dunford

The only reason you should have problems like this with included units is if
you are using classes that are in the units. In this case, TApplication
class, which I thought was actually part of an application anyway.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of vss
 Sent: Wednesday, 22 August 2001 09:58
 To: Multiple recipients of list delphi
 Subject: [DUG]: Application.processmessages


 Hi All.

 Has anyone got or know of a Lite version of appliction.processmessages ?
 When I say Lite what I mean is, that I hav an COM DLL that I wrote that
 needs to use appliction.processmessages. BUT the proble3m is, that I need
 to include FORMS.PAS in the unit. With out it, 102kb...wit it 315kb !
 ok, its not a  major thing, BUT it seems a lot of extra overhead I dont
 need.
 I know I could extract the code I need from froms, but befoe I do, I just
 wanted to check that there was nothing elase around to save e a job.

 Thanks, Jeremy Coulter


 --
 -
 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/



RE: [DUG]: Application.processmessages

2001-08-21 Thread Myles Penlington

On a slightly different track ...
I don't know exactly what you are doing, but in D6 the need for the forms
unit etc is greatly reduced. This is thankfully due to Kylix - ie anything
visual, is no longer required in Units like DB etc.

All you need is a message prcoessing loop.


Myles.
 

-Original Message-
From: vss [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 22 August 2001 9:58 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Application.processmessages


Hi All.

Has anyone got or know of a Lite version of appliction.processmessages ?
When I say Lite what I mean is, that I hav an COM DLL that I wrote that 
needs to use appliction.processmessages. BUT the proble3m is, that I need 
to include FORMS.PAS in the unit. With out it, 102kb...wit it 315kb !
ok, its not a  major thing, BUT it seems a lot of extra overhead I dont 
need.
I know I could extract the code I need from froms, but befoe I do, I just 
wanted to check that there was nothing elase around to save e a job.

Thanks, Jeremy Coulter


---
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/



Re: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Edward Aretino

Use TDump on both apps  compare. I'd be very surprised if both files came 
out the same..

At the DOS prompt:
tdump D:\dev\projects\whatever\myapp.exe mydump.txt

And then a file compare utility (or Word even) to find any differences.

Enjoy,
Ed


At 09:40 21/08/2001 +1200, you wrote:
I've just copied my delphi project folder to another computer that has the
save version of Delphi installed (v5.0 Pro with service pack 1).  After
compiling the project on both computers, the size of the EXE files are about
30k different.  I know it's not enough to worry about but I am curious as to
how this could be.  I've checked all the option settings (including Debug
information) etc but can't find anything set differently.  I'm not using any
3rd party or database components.  Any ideas?

Cheers,
Ross.
---
 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/



RE: [DUG]: Application.processmessages

2001-08-21 Thread vss

Patrick. I am quite aware that this is the problem. Thats why if you look 
at my message I mention it.

TApplication is not part of a COM DLL, remembering its a DLL not an EXE, 
and forms is not automatically added to the uses clause.

Anyway, might just extract the code I need.

Jeremy

-Original Message-
From: Patrick Dunford [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Date: Wed, 22 Aug 2001 10:16:51 +1200
Subject: RE: [DUG]:  Application.processmessages

 The only reason you should have problems like this with included units
 is if
 you are using classes that are in the units. In this case, TApplication
 class, which I thought was actually part of an application anyway.
 
  -Original Message-
  From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On
  Behalf Of vss
  Sent: Wednesday, 22 August 2001 09:58
  To: Multiple recipients of list delphi
  Subject: [DUG]: Application.processmessages
 
 
  Hi All.
 
  Has anyone got or know of a Lite version of
 appliction.processmessages ?
  When I say Lite what I mean is, that I hav an COM DLL that I wrote
 that
  needs to use appliction.processmessages. BUT the proble3m is, that I
 need
  to include FORMS.PAS in the unit. With out it, 102kb...wit it 315kb
 !
  ok, its not a  major thing, BUT it seems a lot of extra overhead I
 dont
  need.
  I know I could extract the code I need from froms, but befoe I do, I
 just
  wanted to check that there was nothing elase around to save e a job.
 
  Thanks, Jeremy Coulter
 
 
  --
  -
  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/



Re: [DUG]: Application.processmessages

2001-08-21 Thread Alex Kouznetsov

Type in application.processmessages.
Ctrl-Click on it.
See the code.
Copy and paste.
Get rid of anything which is not Win APIs.

Alex


- Original Message -
From: vss [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 7:57 AM
Subject: [DUG]: Application.processmessages


 Hi All.

 Has anyone got or know of a Lite version of appliction.processmessages ?
 When I say Lite what I mean is, that I hav an COM DLL that I wrote that
 needs to use appliction.processmessages. BUT the proble3m is, that I need
 to include FORMS.PAS in the unit. With out it, 102kb...wit it 315kb !
 ok, its not a  major thing, BUT it seems a lot of extra overhead I dont
 need.
 I know I could extract the code I need from froms, but befoe I do, I just
 wanted to check that there was nothing elase around to save e a job.

 Thanks, Jeremy Coulter


 --
-
 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/



[DUG]: Early bound Dlls

2001-08-21 Thread vss

Hi all. IF anyone remembers, I asked a question the other day about 
extracting a DLL from my app. but I could not do it because I was early 
binding to the DLL.
Well, an interesting thing. We got our D6 CD today, and was looking at 
the companion CD, and low and behold, there is a bit of code and some 
sample code on exactly what I want to do.
It was apparently in an artical in The Delphi Magazine at some stage.

Its quite interesting to see.

IF anyones interested.

Cheers, Jeremy Coulter


---
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/



RE: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Ross Levis

Hi Edward.

I don't have a copy of TDump.  Surely if the DOS command FC shows many
differences then TDump will do the same?

Cheers,
Ross.

Edward Aretino wrote:
 Use TDump on both apps  compare. I'd be very surprised if 
 both files came 
 out the same..
 
 At the DOS prompt:
 tdump D:\dev\projects\whatever\myapp.exe mydump.txt
 
 And then a file compare utility (or Word even) to find any 
 differences.
 
 Enjoy,
 Ed
 
 
 At 09:40 21/08/2001 +1200, you wrote:
 I've just copied my delphi project folder to another 
 computer that has the
 save version of Delphi installed (v5.0 Pro with service pack 
 1).  After
 compiling the project on both computers, the size of the EXE 
 files are about
 30k different.  I know it's not enough to worry about but I 
 am curious as to
 how this could be.  I've checked all the option settings 
 (including Debug
 information) etc but can't find anything set differently.  
 I'm not using any
 3rd party or database components.  Any ideas?
 
 Cheers,
 Ross.
 -
 --
  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/



RE: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Myles Penlington

This may have some success (or lots of failure).

Compile the application, Start by putting breakpoints at the same places on
both machines, and when it stops, check that the addresses are the same. If
not go back another unit, until you find a unit that is at the same address.
- One way of doing this would be to put breakpoints on the initialization
sections of each unit You start with the project file, and prehaps the
classes and Forms unit and see what you come up with.

Of course this all depends on the size of the resources in the EXE not
affecting the execution location, but I am sure this has no effect (eg both
apps will by default start at $0040).

The quick check is to put a break point in the project on Application.Run.
If this is at the same location in both exe's, then the difference is due to
resources that have been included in the exe.

Myles.




-Original Message-
From: Ross Levis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 22 August 2001 12:53 p.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: EXE filesize differences on 2 computers


Hi Edward.

I don't have a copy of TDump.  Surely if the DOS command FC shows many
differences then TDump will do the same?

Cheers,
Ross.

Edward Aretino wrote:
 Use TDump on both apps  compare. I'd be very surprised if 
 both files came 
 out the same..
 
 At the DOS prompt:
 tdump D:\dev\projects\whatever\myapp.exe mydump.txt
 
 And then a file compare utility (or Word even) to find any 
 differences.
 
 Enjoy,
 Ed
 
 
 At 09:40 21/08/2001 +1200, you wrote:
 I've just copied my delphi project folder to another 
 computer that has the
 save version of Delphi installed (v5.0 Pro with service pack 
 1).  After
 compiling the project on both computers, the size of the EXE 
 files are about
 30k different.  I know it's not enough to worry about but I 
 am curious as to
 how this could be.  I've checked all the option settings 
 (including Debug
 information) etc but can't find anything set differently.  
 I'm not using any
 3rd party or database components.  Any ideas?
 
 Cheers,
 Ross.
 -
 --
  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/
---
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/



RE: [DUG]: EXE filesize differences on 2 computers

2001-08-21 Thread Manning, John

Ross, 

TDump will help highlight what the actually difference is due to. You should
have a copy of TDump in your Delphi\Bin folder, although I am not sure if it
is included with all versions of Delphi. A small sample of what information
this gives you can be obtained by selecting Quick View from inside
Explorer. Without TDump, maybe comparing QuickView output will give a
hint...

John


-Original Message-
From: Ross Levis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 22 August 2001 10:53 am
To: Multiple recipients of list delphi
Subject: RE: [DUG]: EXE filesize differences on 2 computers


Hi Edward.

I don't have a copy of TDump.  Surely if the DOS command FC shows many
differences then TDump will do the same?

Cheers,
Ross.
---
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/



[DUG]: ADO Connection does not seem to disconnect

2001-08-21 Thread Alex Kouznetsov

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/



RE: [DUG]: ADO Connection does not seem to disconnect

2001-08-21 Thread Myles Penlington

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/



Re: [DUG]: ADO Connection does not seem to disconnect

2001-08-21 Thread Alex Kouznetsov

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/



Re: [DUG]: ADO Connection does not seem to disconnect

2001-08-21 Thread Alex Kouznetsov

 I might be just right ! 

Of course it is Myles who is right, not me. Typing mistake.


---
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/



[DUG]: System Default Printer.

2001-08-21 Thread Myles Penlington

Who knows how to get the current system default printer??

Myles Penlington 

---
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/



Re: [DUG]: System Default Printer.

2001-08-21 Thread Robert Martin

I believe the following will list the current selected printer, which will
be the system default (unless you have changed it)

Printer.Printers[Printer.PrinterIndex];

Robert Martin
Software Engineer
Wild Software Ltd
- Original Message -
From: Myles Penlington [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 4:45 PM
Subject: [DUG]: System Default Printer.


 Who knows how to get the current system default printer??

 Myles Penlington

 --
-
 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/



RE: [DUG]: System Default Printer.

2001-08-21 Thread Myles Penlington

Thanks.
That worked great.


-Original Message-
From: Robert Martin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 22 August 2001 5:03 p.m.
To: Multiple recipients of list delphi
Subject: Re: [DUG]: System Default Printer.


I believe the following will list the current selected printer, which will
be the system default (unless you have changed it)

Printer.Printers[Printer.PrinterIndex];

Robert Martin
Software Engineer
Wild Software Ltd
---
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/