Overview of the InterBase Service Components
Go Up to Working with InterBase Services
Contents
This section describes the general concepts of the InterBase service components and methods for attaching and detaching from a services manager.
About the Services Manager
All InterBase servers include a facility called the services manager. The InterBase service components enable client applications to submit requests to the services manager of an InterBase server, and the service manager performs the tasks. the server can be local (on the same host as your application), or remote (on another host on the network). The services components offer the same features when connected to either local or remote InterBase servers.
Service Component Hierarchy
The root object of the InterBase service components is TIBCustomService
, from which descend TIBControlService
and TIBServerProperties. TIBServerProperties
contains properties and methods specific to server configuration, while TIBControlService
is the ancestor object from which all the database configuration and administration components descend.
The following three components descend directly from TIBControlService
:
TIBControlAndQueryService
contains all the database administration elements, such as monitoring, maintenance, and backup and restore, as well as all of the user validation and security elements.TIBConfigService
contains all the methods and properties for database configuration.TIBLicensingService
contains all the properties and methods to add and remove database licenses.
Attaching to a Service Manager
To initiate a connection from your application to an InterBase service manager:
- 1. Place a service component on a form.
- 2. Set the
ServerName
property for that component to the name of the server on which the services are to be run. - 3. Use the
Protocol
property to set the network protocol with which to connect to the server. - 4. Set the
Active
property to <True>. A login dialog is displayed. If you do not wish to display the login dialog, set the user name and password in theParams
string editor, and setLoginPrompt
to <False>.
To start the service, use the ServiceStart
method.
TIBLicensingService
and TIBSecurityService
do not require that you start the service using the ServiceStart
method. For example, to add a license you could use:Action := LicenseAdd; ServiceStart;
or you could use:
AddLicense;
Detaching from a Service Manager
After you finish your tasks with the services components, you should end the connection with the service manager by setting the Active
property to <False>. This calls the Detach
method which detaches the service component from the service manager.