|
This section contains the following topics: How You Connect to Ingres from Eclipse |
To connect to Ingres from the Eclipse SDK, you must download and install the following software and necessary plug-ins, which you can obtain from the Eclipse Data Tools Project page at http://www.eclipse.org/datatools/.
The required versions are described in the Ingres readme.
You can check which plug-ins your copy of Eclipse has by accessing the Eclipse Help menu. If your copy of Eclipse does not have the required versions, you must download and install them.
To install a plug-in
The process for connecting to Ingres from the Eclipse SDK is as follows:
Note: Before you connect to Ingres, ensure that your Ingres instance is running.
To connect to Ingres, you must create a Connection Profile. You can create a connection file from Eclipse's Database Development perspective.
Note: Depending on the development language you are using, you must use the appropriate connection method. The following procedure instructs how to create a JDBC connection profile. For more information on JDBC connectivity, see the Connectivity Guide.
To create a JDBC connection profile
The Open Perspective dialog appears.
The Data Source Explorer tab is added to the SDK.

The New Connection Profile dialog appears.
The Create connection profile panel is displayed.
For example:

Click Next.
The Specify a Driver and Connection Details panel is displayed.
If you have already defined an Ingres driver, proceed to Create a New Database Connection. If you need to define a driver, continue with Define an Ingres Driver.
Note: If you have not defined an Ingres Driver, you must define one. If you have already defined an Ingres driver, skip to Create a New Database Connection.
To define an Ingres driver
The Driver Definitions dialog appears.

The New Driver Entry dialog appears.

The Driver Name field will contain: Ingres JDBC Driver.
The Edit Driver Entry dialog appears.
Note: In most cases Eclipse will be unable to locate the driver file.

Note: You can specify User credentials at connect time, rather than on the generic driver form.
Click OK.

Click OK.
Continue with Create a New Database Connection.
After you have created an Ingres JDBC Driver, you can create a new database connection using this driver.
To create a new database connection
Note: You must specify the database name in the URL field. For example: jdbc:ingres://localhost:II7/demodb

If your current user ID is not a valid Ingres user you must also specify User name and Password values. We recommend using the user credentials of the Ingres instance owner.
An Ingres database is listed in the Data Source Explorer. For example:

After you have created a database connection profile, you can connect to the database from the Data Source Explorer.
To connect to a database

Available databases are listed.
The connection is established. For example:

You can now explore the objects in your database.
An SQL scratch file is required to work with the database, and the file must belong to an Eclipse Project. If you have not created an Eclipse project, you must create one by clicking File, New, General Project. You can then create an SQL scratch file in the Eclipse SDK and connect it to a database.
To create an SQL scratch file
The New dialog appears.
For example:

Click Next.
The SQL File wizard appears.
The folder name is the same as the project name.
For example, "IngresDemoSqlFile":

The Eclipse editor opens the new SQL file you created.

The SQL scratch file is connected to the database.
You can now issue SQL requests. Use the context menu or shortcut keys to execute your request. For example:
