In our previous episode, Mark Morgan Lloyd said: > Given something like > > implementation > > var DBConnectionNearby: TSQLConnection= nil; > > .. > case MainForm.NearbyKind of > dbkFirebird: DBConnectionNearby := TIBConnection.Create(nil); > dbkPostgres: DBConnectionNearby := TPQConnection.Create(nil); > > is there an elegant way of overriding the Connected property to point to > code that can e.g. check that all prerequisite libraries are available > before trying to activate the object?
Check the prequisite libraries yourself, and then if found, initialize the corresponding unit yourself: e.g. in the case of postgres3dyn using Function InitialisePostgres3(Const libpath : ansistring) : integer; _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal