Subject | Re: [IBO] Backup / Restore of embedded/local databases |
---|---|
Author | Mark Pickersgill |
Post date | 2006-06-17T00:26:20Z |
Clive,
The components aren't much use to set active at design time.
However, there's a couple of quirks with the IBOAdmin tools.
1 - They rely on dll_service_attach (in IB_Session.pas) being assigned
which only gets assigned if an IBObjects connection to the database is
attempted. This is why you'll be getting this error (I'm pretty sure) as
you have not used the TIB_Connection component to connect to your
database prior to setting the backup service's Active property to True,
hence the client library is not loaded. You can do a simple connect and
disconnect, which will get dll_service_attach assigned without keeping
the TIB_Connection open, as once the IBOAdmin tools have the dll, they
connect to the service manager using direct dll calls.
2 - By default IBObjects attempts to load gds32.dll. If you want to
specifically use the fbclient.dll, then you need to override the
IB_Constants.IB_GDS32 constant. I use the following unit and add it as
the first unit to my projects. I think there are other ways in the new
IBObjects to specify the client library, but you'd have to take a look
at the release notes.
-------------------------
unit IB_Session_FB;
// This unit must be included as the first unit in the .dpr file.
// This forces IBObjects to use the fbclient.dll file instead of the
GDS32.dll
// client library file.
interface
uses
IB_Constants;
implementation
initialization
// Replace the normal value with the alternate client DLL value.
IB_Constants.IB_GDS32 := 'FBCLIENT.DLL';
end.
-------------------------
cheers
Mark
clivewalden wrote:
The components aren't much use to set active at design time.
However, there's a couple of quirks with the IBOAdmin tools.
1 - They rely on dll_service_attach (in IB_Session.pas) being assigned
which only gets assigned if an IBObjects connection to the database is
attempted. This is why you'll be getting this error (I'm pretty sure) as
you have not used the TIB_Connection component to connect to your
database prior to setting the backup service's Active property to True,
hence the client library is not loaded. You can do a simple connect and
disconnect, which will get dll_service_attach assigned without keeping
the TIB_Connection open, as once the IBOAdmin tools have the dll, they
connect to the service manager using direct dll calls.
2 - By default IBObjects attempts to load gds32.dll. If you want to
specifically use the fbclient.dll, then you need to override the
IB_Constants.IB_GDS32 constant. I use the following unit and add it as
the first unit to my projects. I think there are other ways in the new
IBObjects to specify the client library, but you'd have to take a look
at the release notes.
-------------------------
unit IB_Session_FB;
// This unit must be included as the first unit in the .dpr file.
// This forces IBObjects to use the fbclient.dll file instead of the
GDS32.dll
// client library file.
interface
uses
IB_Constants;
implementation
initialization
// Replace the normal value with the alternate client DLL value.
IB_Constants.IB_GDS32 := 'FBCLIENT.DLL';
end.
-------------------------
cheers
Mark
clivewalden wrote:
>
> Thanks for the suggestion of IBOAdmin components.
> Unfortunately there is not much help that I have found.
> When I drop a backup component on a form and try and set Active=True I
> get an error saying that GDS32.DLL can not be found.
> GDS32.DLL is in system32 and nothing changed even after I dropped
> fbclient.dll into system32 as well (just in case).
>
> Any clue what is going on?
>
> Thanks,
> Clive.
>
>