Skip Top Menu Navigation
Skip Top Menu Navigation

The FREE Enterprise Open Source Database

  Software Documentation Tools Interfaces Administration Development
 

 
You Are Here:  SAP DB > Interfaces > SAP::DBTech::dbm (Perl)

Module SAP::DBTech::dbm (Perl)

Module Contents
  • class DBM
    • DBM: Opens a connection
    • cmd: Executes a command and returns resulting buffer as string
    • rawCmd: Executes a command and returns resulting buffer as a string without checking for errors
    • release: Closes the connection
  • saveUser: Saves a user in the client environment for the DBM Server authorization
  • checkUser: Compares a user in the client environment with the current value
  • deleteUser: Deletes a user in the client environment
Installation

Examples
  • How to test whether the connection to the DBM Server can be established
Exceptions
  • CommunicationError
  • DBMServError



Module Contents

class DBM

constructor DBM
$session = DBM ($server_node, $database_name [, $dependent_path [, $user_info]])

Opens a connection
  • An empty server node will search for a DBM Server on the local machine.
  • When calling general information specify neither the parameter $dependent_path nor the $database_name.
    When working with a specific database indicate the $database_name. Do not specify the $dependent_path.
    When creating a new database specify the absolute path of the relevant installation in $dependent_path. Do not specify the $database_name.
  • The parameter $user_info must contain a string of the following format: <userid>,<password>
    Example: TEST,TEST
cmd
$output = $session->cmd ($cmd)

Executes a command and returns the resulting buffer as a string.
Any error will result in an exception. For the format of the paramter $cmd please see the documentation of the Database Manager CLI.

rawCmd
$output = $session->cmd ($cmd)

Executes a command and returns the resulting buffer as a string without checking for errors.
For the format of the paramter $cmd please see the documentation of the Database Manager CLI.

release
$session->release ()

Closes the connection.

saveUser

saveUser ($database_name, $server_node, $user_password)

Saves a user in the client environment for the authorization towards the DBM Server.

checkUser

$result = checkUser ($database_name, $server_node, $user_password)

Compares a user in the client environment with the current value.

deleteUser

deleteUser ($database_name, $server_node)

Deletes a user in the client environment.



Installation

Add <dependent_path>/misc to PERL5LIB.

Examples

How to test whether the connection to the DBM Server can be established: testdbm.pl

Exceptions

  • CommunicationError: The communication link to the server failed.
  • DBMServError: The execution of the command on the server resulted in an error.


Search / Contact Info
See also ...

Questions or comments about the Web site? Contact the webmaster.