How do I connect to a Database?

Top   « Previous  Next »

 

Connect to a database

 

 

To connect to a database, enter the details of the database connection in the New Connection screen by clicking Connect to Database

 

For this example we'll use the Microsoft Northwind database. Please see Creating an ODBC System Data Source Name (DSN) to connect to the Northwind database as it is a Microsoft Access Database.

 

The connection fields should be completed as follows:

 

Name: northwind

Driver: JDBC:ODBC Bridge

URL: jdbc:odbc:northwind

Username and Password can be left blank for the Northwind database.

 

 

Note: If you were to use a different database type, the url is formatted differently for each driver, eg:

 

MySQL

Driver: org.gjt.mm.mysql.Driver (already supplied in driver settings)

URL Format: jdbc:mysql://[host]:[port]/[database]

eg: jdbc:mysql://192.168.1.189:3306/business

 

Select the driver of your database from the drop down box or Select Add New Driver to add a new database driver.

 

 

After entering the database connection details, click the Save button.

 

Data Sources - Add Database

 

After saving the connection, the database tree shows the database name in the tree. In the main work area a list of tables and fields in that database is shown. These details are only to show the database details and are not able to be edited.

 

Data Sources - Connection

 

Expand the tree by clicking on the + expander

 

This now shows Connection and Views.