Entering content frame

Background documentation Method cmd Locate the document in the library structure

Use

$result = $session->cmd ($cmd_string);

cmd is a method of the class Loader. You use this method to send the Loader command specified under $cmd_string to the Loader server program.

Result

The result of the Loader command is returned.

If the Loader Server program registers an error, an exception of the type LoaderError is raised.

Example

Specifying a valid Loader command

$result = $session->cmd ('CREATE TABLE testtable1 (colname INTEGER)')
print "result: '$result'\n";

The output appears as follows:

result: ''

 

Specifying an invalid Loader command

$result = $session->cmd ('invalid command')
print "result: '$result'\n";

 

The output appears as follows:

Error Loader Server: SQL error -3005 = Invalid SQL statement error position: 1) at /opt/sdb/misc/SAP/DBTech/loader.pm line 89.

(See also: Method rawCmd)

 

Leaving content frame