Professional Documents
Culture Documents
1. Overview
2. Preliminary Setup
3. Configuring Eclipse with JDBC Driver
4. Creating Application and Accessing Database data
1.1. Overview
The configuration of Eclipse for client access to a database is by adding JDBC Driver to
the IDE.
To demonstrate, we shall create an example table in the CSQL database and establish a
JDBC connection to the CSQL database from the Eclipse IDE. Next, we shall insert,
retrieve, update and delete and display the example data in the GUI SQL client.
$cd eclipse
$./eclipse
6. Run the CSQL server in one terminal, Refer CSQL User Manual to know how to
download CSQL and start it.
Right Click on CsqlTest (what we created as our new project) in your left hand
pan under Package Explorer menu.
Go to Properties title and click on that, it will show a dialog box.
Click on Java Build Path > Libraries > Add External JARS button
(Illustrated in Figure 3.)
In a new dialog box, select the CsqlJdbcDriver.jar file, which will be under
/csql/install/lib directory.
Use the below connection string and flag to connect to CSQL database:
Class.forName (“csql.jdbc.JdbcSqlDriver”);
Now write the java code to access the database data in CsqlExample.java application.
Summary
Running application in Eclipse is a matter of configuring the class path and defining a run
configuration.