|
WebLogic Server 6.0 Code Examples, BEA Systems, Inc. | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.dbkona.query
This simple example shows how to connect and execute queries with dbKona. You will need to have Oracle running the DEMO database, with WebLogic jDriver for Oracle (or another Oracle JDBC driver). This example is executed 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/htmlkona and examples/servlets folders.
If you don't have the Oracle DEMO database, you can use the file utils/ddl/demo.ddl to set it up.
The following section describes how to build and run the examples:
$ javac -d %CLIENT_CLASSES% query.java
http://hostname:port/consolewhere:
$ java examples.dbkona.query
Constructor Summary | |
query()
|
Method Summary | |
static void |
main(java.lang.String[] argv)
Here the JDBC connection is set up and created. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public query()
Method Detail |
public static void main(java.lang.String[] argv)
A QueryDataSet simplifies the client-side management of JDBC results by providing the infrastructure of a memory cache. QueryDataSets also allow records to be fetched incrementally. dbKona also provides methods associated with DataSets to automatically generate SQL. A QueryDataSet can be constructed with or without a JDBC ResultSet, which is shown in this method.
After working with the DataSet, we close it, as well as the JDBC ResultSet and the Statement used to execute the query.
|
Documentation is available at http://e-docs.bea.com/wls/docs60 |
|||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |