    All Examples This Package

# Class examples.dbkona.records

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

public class records
extends Object

This example constructs a dbKona TableDataSet for inserting, updating, and deleting records from an Oracle database. To run this example, you must have the Oracle DEMO database running. The connection to the database is made with WebLogic jDriver for Oracle. This example is run from the command line and results are displayed to standard out.

For other examples of how to display query results, check the server-side Java examples that use htmlKona and dbKona in the examples/servlets directories.

If you don't have the Oracle DEMO database, you can use the file `examples/applets/emp.sql` to set it up.

### 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% records.java

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

   $ java examples.dbkona.records

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

##

records()

##

main(String[])
  First the JDBC connection is set up and created.

##

records

     public records()

##

main

     public static void main(String argv[]) throws Exception

  First the JDBC connection is set up and created. Using the JDBC connection object, a TableDataSet is constructed without using SQL -- by supplying the Connection object and the name of the Oracle table. In this example, there is code for inserting, updating, and deleting records with SQL that is automatically generated.

  Creating a TableDataSet with a KeyDef is also illustrated in this sample code, which is required for updates and deletes to the DBMS data. You can save at either the record level or the table level with dbKona.

    All Examples This Package