Method cmd


$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.


The result of the Loader command is returned.

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

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/ line 89.

(See also: Method rawCmd)