[fpc-pascal] Re: linux: should wehard-codeversionedorunversioned shared libraries in our apps?

Michael Van Canneyt michael at freepascal.org
Thu Aug 16 11:03:13 CEST 2012



On Thu, 16 Aug 2012, Ludo Brands wrote:

> Unfortunately your example illustrates nicely the difference.
> InitializeInterbase is unknown in the fpc I'm using. InitialiseIBase60 does
> exist but you have to add the non-trivial ibase60dyn to the uses clause to
> get to it (Google has 146 hits for "InitialiseIBase60", non of the hits are
> documentation or wiki pages). If it where a property of TIBConnection, non
> of these difficulties would exist.

A valid point.

Remains the fact that I think that - no matter what the other component sets do 
- the library name should NOT be a connection component property, unless you 
allow each connection to use a different library. Since that is not possible 
with the current *dyn units, the property should not be made at this level.

What is then the solution ?

If you look at AnyDac, you'll see that it is the only DB component set that IMHO 
does it correctly. It has a separate component for the library (the "physical link") 
of each type of connection. 
You drop this component on the form and set the library name (it has a reasonable default). 
Only one such component is needed for the whole application, no matter how much connections you make..

Now, I happened to think that this may be a bit overkill, which is why I proposed 
a component editor popup to set the library, which can simply insert the correct 
statement in code.

But if people want a point-and-click interface, we can always make a new component:
TSQLDBLibraryLoader or so.
With a property for the library name of each supported DB, so we need only 1 component.

Michael.



More information about the fpc-pascal mailing list