Show TOC Start of Content Area

Procedure documentation Developing Persistence Using Open SQL/JDBC  Locate the document in its SAP Library structure

Use

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 use:

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.

More information: Getting a Connection to the Database

       2.      Insert data into a table

More information: Inserting Data Into a Table

       3.      Retrieve data from the database

More information: Using Queries

More Information

Overview of the JDBC API

End of Content Area