Subject | Re: [IBO] IB Objects and fbclient.dll |
---|---|
Author | Nando Dessena |
Post date | 2004-12-08T08:40:17Z |
Robert,
r> What we would like would be to tell have
r> the option to tell IBObjects which
r> system to work with.
as suggested, you can do that since the client library name is stored
in a global variable.
r> Ie. one of our customers actually runs both
r> interbase and firebird on the same system,
r> which really makes it difficult for us.
I have to note that I have changed gds32.dll from IB5.6 with a renamed
fbembed.dll (not even fbclient!) without any noticeable problem on *a
lot* of sites. The Server Manager refused to start because of a
missing export in fbembed, but I could live with it and that was no
problem for me.
If you want to be completely safe, then use whatever client library
you find on the system, but then your application has to account for
little differences in behaviour.
r> We would like to tell IBObjects to forcibly
r> use fbclient.dll instead of gds32.dll
r> but this must be optional, and not hard coded.
Helen has already told you all about the "hardcoded way" and
alternatives. You can set the library name at run time as well if you
need.
Just add a "uses IB_Constants" sufficiently up in your project's unit
initialization list, and do something like:
IB_GDS32 := GetClientLibraryName();
*before you do anything with IBO*, that is roughly before you create
any IBO component. You can implement GetClientLibraryName() as a loop
that searches the possible library names in the order that suits you
best and return the name of the first one found. I think I have seen
examples of this in this very list, particularly one by Frank
Ingermann that did read the system Registry to find out the Fb path
IIRC.
A final note: whatever the library name you set, if IBO can't find the
library it will display a message "InterBase Client GDS32.DLL is not
installed". Don't let the message fool you, the library name is not
hardcoded, just the message is (BTW Jason perhaps you might want to
change this:
E_IB_Client_Not_Installed = 'InterBase Client GDS32.DLL is not installed';
to
E_IB_Client_Not_Installed = 'InterBase Client ' + IB_GDS32 + ' is not installed';
but it would then need to be a var and not a const).
I once made some work that allowed you to specify the library name as a
property of IB_Session, but it was unfinished and is currently
gathering dust (not rust ;-)) somewhere.
Ciao
--
Nando Dessena
http://www.flamerobin.org
r> What we would like would be to tell have
r> the option to tell IBObjects which
r> system to work with.
as suggested, you can do that since the client library name is stored
in a global variable.
r> Ie. one of our customers actually runs both
r> interbase and firebird on the same system,
r> which really makes it difficult for us.
I have to note that I have changed gds32.dll from IB5.6 with a renamed
fbembed.dll (not even fbclient!) without any noticeable problem on *a
lot* of sites. The Server Manager refused to start because of a
missing export in fbembed, but I could live with it and that was no
problem for me.
If you want to be completely safe, then use whatever client library
you find on the system, but then your application has to account for
little differences in behaviour.
r> We would like to tell IBObjects to forcibly
r> use fbclient.dll instead of gds32.dll
r> but this must be optional, and not hard coded.
Helen has already told you all about the "hardcoded way" and
alternatives. You can set the library name at run time as well if you
need.
Just add a "uses IB_Constants" sufficiently up in your project's unit
initialization list, and do something like:
IB_GDS32 := GetClientLibraryName();
*before you do anything with IBO*, that is roughly before you create
any IBO component. You can implement GetClientLibraryName() as a loop
that searches the possible library names in the order that suits you
best and return the name of the first one found. I think I have seen
examples of this in this very list, particularly one by Frank
Ingermann that did read the system Registry to find out the Fb path
IIRC.
A final note: whatever the library name you set, if IBO can't find the
library it will display a message "InterBase Client GDS32.DLL is not
installed". Don't let the message fool you, the library name is not
hardcoded, just the message is (BTW Jason perhaps you might want to
change this:
E_IB_Client_Not_Installed = 'InterBase Client GDS32.DLL is not installed';
to
E_IB_Client_Not_Installed = 'InterBase Client ' + IB_GDS32 + ' is not installed';
but it would then need to be a var and not a const).
I once made some work that allowed you to specify the library name as a
property of IB_Session, but it was unfinished and is currently
gathering dust (not rust ;-)) somewhere.
Ciao
--
Nando Dessena
http://www.flamerobin.org