Entering content frame

Procedure documentation Call with the Java Interface of the Loader Locate the document in the library structure

You can call the Loader using Java.

Prerequisites

Java is installed on the computer.

Procedure

The following Java modules are delivered with the Loader program:

com.sap.dbtech.powertoys.Loader

com.sap.dbtech.powertoys.LoaderException

Use the following classes to call the Loader:

·        Class Loader

·        Exception Class

Class Loader

Java module: com.sap.dbtech.powertoys.Loader

public class Loader extends java.lang.Object

With the Loader class, you can create new Loader object instances and execute SQL statements or Loader commands.

Constructor: Loader

public Loader(java.util.Properties properties) throws RTEException

A new Loader object instance is created. The Loader class uses the following properties:

·        host: the Loader is started on this computer.

·        dbname: the Loader is started for the specified database instance.

·        dbroot: the Loader is started for this version/in this directory.

Methods

cmd

public java.lang.String cmd(java.lang.String cmdString) throws RTEException, LoaderException

An SQL statement or a Loader command (cmdString) is executed.

dbLoader

public static Loader dbloader(java.lang.String host, java.lang.String dbname) throws RTEException

A new Loader object instance is created in which the computer name (host) and the name of the database instance (dbname) are specified.

dbroot
Loader

public static Loader dbrootloader(java.lang.String host, java.lang.String dbroot) throws RTEException

A new Loader object instance is created in which the computer name (host) and the dbroot directory are specified.

finalize

public void finalize() throws RTEException

This method overwrites the finalize()method of the class java.lang.Object.

release

public void release() throws RTEException

The Loader session is ended.

 

Exception Class

Java module: com.sap.dbtech.powertoys.LoaderException

public class LoaderException extends java.lang

If a Loader command fails, the Loader exception is raised.

Methods

getErrorCode

public int getErrorCode()

The error code set by the Loader is returned.

getErrorID

public java.lang.String getErrorID()

The error number set by the Loader is returned.

toString

public java.lang.String toString()

The exception is output as a string object.

 

 

Leaving content frame