Rogue Wave DB Link Tutorial > Rogue Wave DB Link Basic Use
 
Rogue Wave DB Link Basic Use
This chapter details the fundamental principles of Rogue Wave® 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 Rogue Wave 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:
*Step 1: Connecting to the Database - Shows how to connect to the database, using the IldDbms class.
*Step 2: Querying the Database - Sends a query to the database.
*Step 3: Retrieving Data from the Database - Retrieves the output from a select query.
*Step 4: Disconnecting From the Database - Disconnects from the database and releases the objects.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.