Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Scout/Tutorial/3.7/Minicrm/Set up SQL Service"
(→Create a new AbstractDerbySqlService) |
m |
||
Line 29: | Line 29: | ||
Adjust the '''settings''' in your ''DerbySqlService'' by editing the '''Jdbc Mapping Name'''. It should point to the folder where you unzipped the DerbyDb to. That's the example database you downloaded {{ScoutLink|Tutorial|Installation and Setup|at the beginning of this tutorial}}. | Adjust the '''settings''' in your ''DerbySqlService'' by editing the '''Jdbc Mapping Name'''. It should point to the folder where you unzipped the DerbyDb to. That's the example database you downloaded {{ScoutLink|Tutorial|Installation and Setup|at the beginning of this tutorial}}. | ||
+ | |||
+ | Also make sure you have the right '''Jdbc Driver Name''' set. | ||
Use '''minicrm''' for both '''username''' and '''password'''. | Use '''minicrm''' for both '''username''' and '''password'''. |
Revision as of 03:50, 7 October 2011
The Scout documentation has been moved to https://eclipsescout.github.io/.
We want to connect to a database. In Scout terms, the client might want to fill a table with data from the database. It calls a service on the server which provides the desired data. That service in turn has to get the data from somewhere. In this case, it sends a SQL statement to yet another service, the SQL service. This service will handle connecting to the database and the rest.
Eclipse Scout comes with support for Apache Derby out of the box. Support for PostgreSQL and Oracle is trivial to add (and comes with the all-in-one downloads on the Eclipse Scout download page). Switching to other solutions like Hibernate is possible, but beyond the scope of the tutorial. (Essentially you'll need to use Hibernate beans instead of the FormData objects Eclipse Scout provides for you to communicate between client and server.)
We will use Apache Derby in this tutorial. Derby is an open source relational database implemented entirely in Java and available under the Apache License.
Once you have your SQL Service, you're ready to The Scout documentation has been moved to https://eclipsescout.github.io/. of your application.
Create a new AbstractDerbySqlService
Go to the server node and open the tree, drill down to Sql Services below Common Services and right-click on it in order to open the wizard to create a new SQL service.
Name your new service DerbySqlService and choose AbstractDerbySqlService from the combobox Super Type then click Finish.
Change default configuration settings
Adjust the settings in your DerbySqlService by editing the Jdbc Mapping Name. It should point to the folder where you unzipped the DerbyDb to. That's the example database you downloaded The Scout documentation has been moved to https://eclipsescout.github.io/..
Also make sure you have the right Jdbc Driver Name set.
Use minicrm for both username and password.