0

I'm new with Java, Scout and Oracle 11g express. I want to make a simple application with one form and with click on button get, form populates with data from database. So my question is how to connect scout application with Oracle 11g on localhost. Do i need to connect via JDBC driver or can i do all this via Eclipse Scoute interface. Any links or guidelines will be helpfull. How would you approach the problem?

Jmini
  • 9,189
  • 2
  • 55
  • 77
Valor_
  • 3,461
  • 9
  • 60
  • 109

1 Answers1

0

I found out how to connect to oracle database.

Firs of all you need to click on you root project nood.
In scout Object properties expand tab Technologies.

Unckeck Derby 10 JDBC Driver for Eclipse Scoute
Select all and press OK
Check Oracle 11g2 JDBC Driver for Eclipse Scoute
Select all and press OK

Then chose server node
GO in Common Services -> SQL services
On SQL services right click and create new SQL service

Name your SqlService (example: OracleSqlService)
Supper class: AbstractSqlService

Press finish

Select your new OracleSqlService
GO in Scout Object Properties
Add username: system
Add password: root
Correct Jdbc mapping name: jdbc:oracle:thin:@localhost:1521:xe

Now we will access the database for our helloworld project. For this go to Server->Services->DesktopService->load and double click on the 'load' operation. Implement the method as follows:

public DesktopFormData load(DesktopFormData formData) throws ProcessingException {
  SQL.selectInto("SELECT 'Hello World!' INTO :message", formData);
  return formData;
}
Valor_
  • 3,461
  • 9
  • 60
  • 109