Subject RE: [IBO] How find where a program uses unnecessary BDE units?
Author John Tomaselli
I demo'd a program from http://www.peganza.com/ and it seemed pretty good.
John

-----Original Message-----
From: Frank Ingermann [mailto:frank@...]
Sent: Wednesday, May 15, 2002 8:20 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] How find where a program uses unnecessary BDE units?


Hi Marco / Artur,

Artur Anjos wrote:
> Hi Marco,
>
> You right about this. In Delphi 5 (don't know about Delphi 6) if you
declare
> a file in the uses clause, Delphi actually link it to the exe file, even
if
> you do not use it.
>
> It's hard to find it. There's no automatic way to do it. You must delete
it
> manually from the uses clause and try it. Argh. I found some utilities to
do
> this using google sometime ago. I really test one or two, but I didn't
like
> them and I did it manually.

Do you know GExperts? it's a free IDE enhancement with lots of useful
functions. Amongst them is "Project dependencies": you select a unit
from your project and a little tool shows you all units used by that,
*even indirectly!* (that is unita uses unitb which uses unitc, you'll still
see unitc watching unita).

you can get it from http://www.gexperts.org/download.html

> But I think that the DB file that you are talking about it's not BDE
> related: it's there to use the TDataset descendants. But I'm not sure
about
> that.

you're right, the "bad" unit is actually DBTables, not DB. When your app
really uses the BDE, sooner or later it has to call dbiInit (the BDE
initialization api). This on gets called by TSession.InitializeBDE, which
gets called by TSession.StartSession.

a plain way to find out if the BDE is used is to simply rename the BDE
directory. You'll then get an error message (BDE initialization failed)
when you run your app. (this should get you going, unless you have
dynamically created data modules that might still use BDE - in that case
you'd only get the error when you call that part of your app...)

hth,
fingerman
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?

fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/