PreviousDTO Programmer's Guide (9.1 revision 1) Next

DtoServices Object

Show this topic in Library frames

This object is a collection of DtoService objects, representing the Pervasive services running on the server.

Properties

Status
Returns the status of a service. You must pass the service of which you want the status:
dtoServiceTransactional
dtoServiceRelational
dtoServiceIDS
StatusString
Returns the string representation of the current status.

Methods
RestartAllServices method 
StartIDS method 
StartRelational method 
StartTransactional method 
StopIDS method 
StopRelational method 
StopTransactional method 
Remarks

The methods of DtoServices control the Pervasive.SQL engine services running on the machine you connected to with the DtoSession object. All these methods return the enumeration DtoResult.

This object lets you start and stop the Pervasive.SQL engine services running on Windows NT or Windows 2000 servers. Also, you can query the current status of Pervasive.SQL services using the Status or StatusString properties.

Security Information Regarding DtoServices Object

To configure IIS to allow starting and stopping of services from a DTO web application

  1. Click Start, select Settings and point to Control Panel.
  2. Double-click Administrative Tools.
  3. Double-click Internet Service Manager.
  4. Browse to the folder containing your DTO ASP application.
  5. Right-click the folder in the left pane and select Properties.
  6. Click the Directory tab.
  7. Specify Low (IIS Process) in the Application Protection field as shown in Figure 3-1.
  8. Figure 3-1 Required IIS Directory Properties for DTO Services Methods

Example
' This example connects to a server and restarts all 
' Pervasive services. 
Dim my_session as new DtoSession 
Dim my_services as DtoServices 
Dim result as DtoResult 
result = my_session.Connect("myserver", "username", 
"password") 
Set my_services = my_session.Services 
result = my_services.RestartAllServices 
See Also

DtoSession Object
DtoSetting Object

Methods Detail

RestartAllServices method

Stops and then restarts the transactional, relational, and IDS services.

Syntax
result = Services.RestartAllServices 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.

StartIDS method

Starts the I*net Data Server service.

Syntax
result = Services.StartIDS 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.

StartRelational method

Starts the Relational service.

Syntax
result = Services.StartRelational 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.

StartTransactional method

Starts the Btrieve transactional engine service.

Syntax
result = Services.StartTransactional 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.

StopIDS method

Stops the I*net Data Server service.

Syntax
result = Services.StopIDS 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.

StopRelational method

Stops the Relational engine service.

Syntax
result = Services.StopRelational 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.

StopTransactional method

Stops the Btrieve transactional engine service.

Syntax
result = Services.StopTransactional 
Arguments

Services
DtoServices object

Return Values

result
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.


Chapter contents
Publication contents

Prev topic: DtoSelectionItem Object
Next topic: Monitoring Pervasive Servers with DTO