Entering content frame

Background documentation Class Loader Locate the document in the library structure

Use

Loader is a class of the sdb.loader module.

Class Content

The class Loader contains the following methods:

cmd (cmd_string)

rawCmd (cmd_string)

sql (cmd_string)

release ()

Definition of the Constructor

Loader ()

When the constructor is called, the Python Loader module starts Loader on the local computer. There is still no connection to a database instance.

Examples

·        Starting a session on the local computer with the DEMODB database instance:

session = sdb.loader.Loader ()
session.cmd('USE SERVERDB DEMODB')

·        Starting a session on the GENUA computer with the DEMODB database instance:

session = sdb.loader.Loader ()
session.cmd('USE SERVERDB DEMODB ON GENUA')

·        Starting a session with the DEMODB database instance for user MONA with the password RED on the computer GENUA:

session = sdb.loader.Loader ()session.cmd('USE USER MONA RED SERVERDB DEMODB ON GENUA')

·        Ending the session with the database instance

del session

 

Leaving content frame