Entering content frame

Background documentation Method rawCmd Locate the document in the library structure

Definition

rawCmd (cmd_string)

Use

rawCmd is a method of the class DBM. You use this method to send the DBM command specified under cmd_string to the Database Manager program.

Errors returned by the Database Manager do not raise an exception.

The return code starts with OK if the command was executed successfully; it starts with ERR if the command failed.

(See also: Method cmd)

Result

The result of the DBM command is returned.

Examples

Inputting a valid DBM command:

result = session.rawCmd ('db_state')
print repr (result)

Result:

'OK\nState\nOFFLINE\n'

 

Inputting an invalid DBM command:

result = session.rawCmd ('invalid command')
print repr (result)

Result:

'ERR\n-24977,ERR_COMMAND: unknown command "invalid"\n'

 

 

Leaving content frame