Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Wählen Sie im Menü In the menu, select File > New > Other... . 
  2. Wählen Sie im folgenden Dialog Datasource und klicken Sie Select Datasource in the following dialog and click Next >.

Bestehende Datenquelle anbinden 

...

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.

Neue Datenquelle anlegen

...

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 >.


    Klicken Sie im folgenden Dialog auf Create Driver, um den JDBC-Treiber für Ihre Datenbank zu laden.
    Image Removed
  4. Geben Sie bei Properties die Verbindungsdaten zu Ihrer Datenbank ein.

  5. Klicken Sie auf Test Connection, um die Verbindung zu testen.
  6. Klicken Sie Next > und abschließend auf Finish.

  7. Wählen Sie bei Dialect den korrekten Hibernate Dialekt für Ihre Datenbank aus und klicken Sie Finish.
Ergebnis:

Die neue Datenquelle wird im Eclipse Data Source Explorer angelegt und in Ihr Projekt eingebunden.

Image Removed

Hinweis:

...


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

    Image Added

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

  3. Click Test Connection to test the connection.
  4. Click Next> and then click Finish.

  5. 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.

Image Added

Note:

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