Entering content frame

Background documentation Loader Class Locate the document in its SAP Library structure

Use

Loader is a class of the sapdb.loader module.

Class Content

The Loader class contains the following methods:

cmd (cmd_string)

rawCmd (cmd_string)

sql (cmd_string)

release ()

Constructor Definition

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

·        To create a connection on the local computer to the HOTELDB database instance:

session = sapdb.loader.Loader ()
session.cmd('USE SERVERDB HOTELDB')

·        To create a connection on the GENUA computer to the HOTELDB database instance:

session = sapdb.loader.Loader ()
session.cmd('USE SERVERDB HOTELDB ON GENUA')

·        To create a connection on the GENUA computer to the HOTELDB database instance for the user MONA:

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

Use the del session command to disconnect from the database instance.

 

Leaving content frame