Using Databases in E3: Chapter 2 – Connection with the Database.

To establish a connection with a database in E3 using the Organizer, first you must create a Database object, according to the following figure:

Figure 1: Inserting a Database object

Accessing the properties of the object just created in the Database field, it is possible to choose which database is used (Figure 2).

Figure 2: Available databases for connection

After choosing a database, you must configure the communication. Next, the configuration for each database available.

Access

When selecting the Access database you can create, from E3, not only the database connection, but also the .mdb (the extension for Access files) file itself. In the figure 3 you can see the configuration screen.

Figure 3: Access configuration

Where:

  • MDB File: Name of the .mdb file used in the project
  • DB Password: Password of the Access database
  • User: Database user connected via E3
  • Password: Password of the user who performs the logon
  • Test Connection: Tests the database connection

When testing the connection, if the items listed previously are correctly configured, the following message is returned:

Figure 4: Successful connection

SQL Server

When selecting the SQL Server database, you must first create a database manually, using the SQL Server own management tool. For this, you must connect to the SQL Server using the server name, username, and password, as displayed in figure 5.

Figure 5: SQL Server logon screen

After establishing a database connection, you must create a new Database object.

  1. Right-click the Databases item and choose the New Database option, according to the Figure 6.

Figure 6: Creating a new database

  1. In the Database Name field type the name of the database to create. Then, click the OK button.

Figure 7: Naming the database

  1. Then, check if the database appears on the list of databases.

Figure 8: List of available databases

  1. Back to E3, in the Organizer, insert a new database in the project and configure the communication parameters, using previously informed data:

Figure 9: Configuring communication with SQL Server database

Onde:

  • Server: Name of the computer hosting the database
  • Database: Name of the database to use
  • Network Library: Protocol used when communicating with the database
  • User: Database user connected via E3
  • Password: Password of the user who performs the logon
  • Test Connection: Tests the database connection

Oracle

To use a database on an Oracle server, you must create a service (Net Service Name) manualmente (https://kb.elipse.com.br/en-us/questions/85). After that, you must configure the database in E3, via Organizer, this way:

Figure 10: Configuring communication with an Oracle database

Where:

  • Connection: Name of the Net Service
  • Use TIMESTAMP type and Use ADO Oracle Drivers: These options must be checked in case of using date/time information with a precision of milliseconds.
  • User: User of the database connected via E3
  • Password: Password of the user who performs thelogon
  • Test Connection: Tests the database connection

NOTE: When Oracle runs on the same machine as the E3 Server, there is no need to install the Oracle client, and you must also leave the Connection field empty.

If the configuration is correct, when pressing the Test Connection button a window indicating success is displayed.

Figure 11: Successful communication with the database

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *