Subject Re: [IBO] Enhancement Suggestion: Client Libraries
Author Geoff Worboys

Nando Dessena wrote:
> Geoff,

G>> Initialization sections are called before we get into the
G>> the program itself, which prevents runtime customisation (or
G>> at least prevents it from being easy and predictable).

> ??? Init sections are part of the program; you can read the
> library name from the command line, a file or the registry
> by adding code to the initialization section of a unit that
> you put first (or better right after SysUtils, which will
> install the first level exception handler) in your uses
> clause, so that the init order of your program is:

I have never liked trying to use the order of the uses items.
It is so easily broken and far from explicit because most of
the time the order can be ignored.

Its funny actually, I was going to "pick on you" for trying to
assign a value to a constant (IB_GDS32) but checked first and
discovered it is a "var" - not what I expected in IB_CONSTANTS,
I did not even think about trying to assign to it. Oh how easy
it is to miss the obvious!

Whatever. I do like my solution better. It is much more
flexible about where and how you get library name. You can
actually start an application and open a form with lots of IBO
stuff on it and then read your registry settings to get all
the various bits and pieces you want and then finally assign
the library name before starting a connection. Even better
you can, with care, close your connection, unload your library
and then start a new connection with a different library - not
something I need right now but could be useful down the track.

Geoff Worboys
Telesis Computing