DB Link Basic Use

This chapter details the fundamental principles of DB Link through the use of a sample. Working through the 4 steps found in this chapter will help you understand how to send basic queries to the database server and then retrieve the results.

The main class is IldDbms, which handles the connection to the RDBMS. It also gives access to the schema handling capabilities and manages various configuration settings.

Then, the IldRequest class is designed to send queries to the RDBMS and get the results back. To send a query, you first need to be connected. Therefore, instances of IldRequest are created or released through an IldDbms instance that handles the connection.

The IldDiagnostic class is used to manage errors that may be raised. These errors can come from the RDBMS or from DB Link itself.

The IldDbms and IldRequest classes get access to the error information by the same API. This reduces the time required to learn how to handle the errors and is achieved with the IldIldBase class.

IldIldBase is an abstract class: you do not need to create an instance of this class. Its only purpose is to implement the error mechanism that will be used by the IldDbms and IldRequest classes. They both inherit from IldIldBase. IldIldBase includes an instance of the IldDiagnostic class and provides methods to access the error information.

This tutorial has 4 steps: