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.
Single Connection
TestInstallCreateTable.java
TestInstallJDBC.java
TestInstallSQLJ.sqlj
TestInstallSQLJChecker.sqlj
These four samples test basic JDBC and SQLJ connections to a database.
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.
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.
Multiple Schemas / Connections
MultiSchema.sqlj
This sample shows how to connect to multiple databases and schemas.
Multi-Threaded Applications
MultiThreadDemo.sqlj
This sample shows the use of multiple threads in a SQLJ program, each of which
performs some database operation.
Dynamic SQLJ / JDBC Interoperability
JDBCInterop.sqlj
This sample shows the use of dynamic SQL via JDBC in a SQLJ program.
|