SQLJ Product Samples

The following samples ship with Oracle8 v8.0.5 and the downloadable SQLJ drivers, and use the standard SCOTT/TIGER schema.

Download all the samples (JAR - 22KB), and
View the Readme for individual explanations of each sample.

Note: These samples all use information contained in the file connect.properties file to establish a runtime connection. Many also use the sqlj.properties file for schema validation.

Code Sample Single Connection
TestInstallCreateTable.java

TestInstallJDBC.java

TestInstallSQLJ.sqlj

TestInstallSQLJChecker.sqlj

These four samples test basic JDBC and SQLJ connections to a database.

Code Sample Retrieval of Multi-Row Data
Named Iterators (IterDemo1.sqlj)

Positional Iterators (IterDemo2.sqlj)

Explicit and Default Connection Contexts (SqljDemo.sqlj)

These three samples show the retrieval of multi-row data using named iterators, positional iterators, and explicit and default connection contexts.

Code Sample Host Expressions
ExprDemo1.sqlj

This sample shows the use of Java host expressions in #sql statements for passing arguments into and out of SQL operations.

Code Sample Multiple Schemas / Connections
MultiSchema.sqlj

This sample shows how to connect to multiple databases and schemas.

Code Sample Multi-Threaded Applications
MultiThreadDemo.sqlj

This sample shows the use of multiple threads in a SQLJ program, each of which performs some database operation.

Code Sample Dynamic SQLJ / JDBC Interoperability
JDBCInterop.sqlj

This sample shows the use of dynamic SQL via JDBC in a SQLJ program.

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy