Slide 12.2: A sample JDBC program
Slide 12.4: Importing packages
Home
A Typical JDBC API Usage Sequence
The JDBC API makes it possible to do three things:
Establish a connection with a database.
Send SQL statements.
Process the results.
The following tasks connect to and query a database from the client:
Import packages.
Register the JDBC drivers.
Open a connection to a database.
Create a statement object.
Execute a query and return a result set object.
Process the result set.
Close the result set and statement objects.
Make changes to the database.
Commit changes.
Close the connection.
You must supply Oracle driver-specific information for the first three tasks, which allow your program to use the JDBC API to access a database.