All Examples This Package

Class examples.dbkona.sequences

java.lang.Object
   |
   +----examples.dbkona.sequences

public class sequences
extends Object
This class demonstrates using a dbKona Sequence object to create, use, and drop an Oracle sequence. A dbKona Sequence object is a wrapper for an Oracle sequence.

To run this example, you'll need an Oracle database. The example is executed from the command line and results are displayed to standard out.

To set up this example:

  1. Set up your development shell as described in Setting up your environment.

  2. Change connection parameters to correspond to your Oracle configuration. If you need more help, check the section on connecting to a database in the Developers Guide, Using WebLogic jDriver for Oracle.

  3. Compile this example by executing the following command in your development shell:

    $ javac -d %CLIENT_CLASSES% sequences.java

  4. Run this example by executing the following command in your development shell:

    $ java examples.dbkona.sequences

Author:
Copyright (c) 1996-2000 by BEA Systems, Inc. All Rights Reserved.


Constructor Index

 o sequences()

Method Index

 o main(String[])
Here the JDBC connection is configured and made.

Constructors

 o sequences
 public sequences()

Methods

 o main
 public static void main(String argv[]) throws Exception
Here the JDBC connection is configured and made. Before we attempt to create a new dbKona Sequence, which is always used in context of the JDBC connection object, we first try to drop a Sequence of the same name. Then the Sequence is created and its next value is printed out in a loop from 0 - 9. Finally the Sequence is dropped and closed, and the JDBC connection is closed.


All Examples This Package