Altova StyleVision 2025 Enterprise Edition

This example shows how to connect to an Oracle database server using the JDBC interface. The connection is created as a pure Java connection, using the Oracle Instant Client Package (Basic) available from the Oracle website. The advantage of this connection type is that it requires only the Java environment and the .jar libraries supplied by the Oracle Instant Client Package.

 

Prerequisites

JRE (Java Runtime Environment) or Java Development Kit (JDK) must be installed. This may be either Oracle JDK or an open source build such as Oracle OpenJDK. StyleVision will determine the path to the Java Virtual Machine (JVM) from the following locations, in this order: (i) the custom JVM path you may have set in application Options; ; (ii) the JVM path found in the Windows registry; (iii) the JAVA_HOME environment variable.

Make sure that the platform of StyleVision (32-bit, 64-bit) matches that of the JRE/JDK.

The Oracle Instant Client Package (Basic) must be available on your operating system. The package can be downloaded from the official Oracle website. This example uses Oracle Instant Client Package version 12.1.0.2.0, for Windows 32-bit and, consequently, Oracle JDK 32-bit.

You have the following database connection details: host, port, service name, username, and password.

 

Connection

1.Start the database connection wizard and click JDBC Connections (see JDBC Connection for a screenshot of the dialog).

2.In the Classpaths field, enter the path to the .jar file that provides connectivity to the database. If necessary, you can also enter a semicolon-separated list of .jar file paths. If you have added the filepath to the CLASSPATH of the system, you can leave this field empty.

3.In the Driver field, select the appropriate driver. Relevant drivers will be available only if a valid .jar file path is in the Classpaths field or in the CLASSPATH environment variable.

4.Enter the username and password for the database in the corresponding fields.

5.Enter the JDBC connection string in the Database URL field according to the pattern in the table below, replacing the highlighted values with the ones applicable to your database server.

6.Click Connect.

 

Connection details of the Oracle example

 

Field

Value

Classpaths

C:\jdbc\instantclient_12_1\ojdbc7.jar

Driver

oracle.jdbc.OracleDriver or oracle.jdbcdriver.OracleDriver

Database URL

jdbc:oracle:thin:@//host:port:service

 

 

© 2019-2025 Altova GmbH