/
Creating a Data Source

Creating a Data Source


  1. In the menu, select File > New > Other... . 
  2. Select Datasource in the following dialog and click Next >.

Adding existing data sources 

  1. Select your persistence unit in Persistence Unit.
  2. Click Data Source and select the sample database H2 Northwind
  3. Click Finish.

Creating a new data source

  1. Ensure that your database server is running.
  2. Click New > Connection Profile to create a new data source.
  3. Select your database in the following dialog, e.g. MySQL, then click Next >.



  4. Click Create Driver in the following dialog to load the JDBC driver for your database.



  5. Enter the data required to connect with your database in Properties.

  6. Click Test Connection to test the connection.
  7. Click Next> and then click Finish.

  8. Select the correct Hibernate dialect for your database in Dialect and click Finish.
Result:

The new data source is created in the Eclipse Data Source Explorer and is added to your project.

Note:

You can also create new data sources directly in the Data Source Explorer.



Related content

Database > Entity Import (Create JPA Entities)
Database > Entity Import (Create JPA Entities)
More like this
JPA-SQL
More like this
Adding, Editing, and Deleting Attributes
Adding, Editing, and Deleting Attributes
More like this
Database Access - Data Access
Database Access - Data Access
Read with this
Entity > Database Export (Create tables)
Entity > Database Export (Create tables)
More like this
Native SQL Strings
Native SQL Strings
Read with this

XDEV Software Corp. - One Embarcadero Center, San Francisco, CA 94111, US
Copyright © 2015. XDEV Software Corp. All rights reserved.