Show TOC

Using Open SQL/JDBC in the Persistence LayerLocate this document in the navigation structure

Context

The aim of Open SQL for Java is to allow application developers to implement database access independently of a particular database system. This goal is achieved by:

  • Defining a subset of SQL that is comprehensible for all database systems.

    More information: Open SQL Grammar

  • Defining a subset of JDBC that is compatible with all database systems. This section deals with Open SQL/JDBC.

Although JDBC is a standard that is recognized by the Java community, existing implementations of various database vendors differ in details. Open SQL/JDBC is the JDBC-compatible implementation of the essential parts of the JDBC standard. This implementation allows you to access in a portable way all database systems that are supported by SAP. Open SQL/JDBC implements the interfaces from the Java package java.sql.* .

Using Open SQL/JDBC, you can select and modify data in existing database tables. The tables are created in the Java Dictionary.

More information about Java Dictionary: Providing Java Dictionary Tables and Data Types

More information about the most important aspects of Open SQL/JDBC:

Semantics of the Data Types DATE, TIME, and TIMESTAMP

Transactions in Open SQL/JDBC

Native SQL Access

Error Handling

Procedure

  1. Get a connection to the database.
  2. More information: Getting a Connection to the Database
  3. Insert data into a table
  4. More information: Inserting Data Into Tables
  5. Retrieve data from the database
  6. More information: Using Queries