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

Marco van de Voort marcov at stack.nl
Thu Aug 16 11:58:50 CEST 2012


In our previous episode, Ludo Brands said:
> 
> 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.  

Documentation is a different story.
 
> > I cannot remember when I've last used the OI for setting the 
> > username/password/databasename for a connection.
> > 
> 
> That is your usage case. The fact that username/password/databasename
> properties exist in all db components I know of seems to suggest that there
> are usage cases where it is used.

Easy. Designtime packages must also be able to find it. (e.g. to query the
database for fieldnames to make field selection in grids etc easier).

> Made a quick tour of the other dbcomponents I have on my system: Zeos
> (TZConnection.LibraryLocation)

Zeos' dbconnection is not database dependent. The database dependency is
provided by adapter interfaces that are separately registered. Schemes like
this could make a database type (and version) possible by merely adding an
unit which registers some new datatype.

This avoids a potential problem with sqldb (deleteing connection, adding
new) forces you to reconnect all queries with the new connection.  This can
be monkeyed around with lfm editing, but that is not "nice".

This is all IIRC, it was some time ago. I think mysql users are more
familiar with these problems :-)

> MDO (TMDODataBase.ClientLib), Delphi's DBExpress
> (TSQLConnection.VendorLib).  They have all this useless component property
> to specify a project wide library. 

It might be because of the above designtime requirement. I don't know how
much sqldb supports there.




More information about the fpc-pascal mailing list