[go: up one dir, main page]

  Top

4.3. Sample JDBC Applications & Applets

4.3.1. JDBCDemo Java Application

  1. Go to the Virtuoso "Start Menu" program group and then follow the JDBC Samples-->JDBCDemo (JDK1.1&1.2) menu path, this will execute a DOS batch program that initializes the Java demo application.

    Figure 4.13. JDBC Demo

    JDBC Demo

  2. Set the JDBC Driver Name and URL settings for your connection to the Virtuoso demonstration database. The "Driver Name" field identifies the Virtuoso Driver. If it is left blank, then it defaults to "virtuoso.jdbc.Driver", which is the Virtuoso Driver for JDBC 1.0. The "Connection URL" field requires a valid Virtuoso JDBC URL.

    Figure 4.14. JDBC Demo

    JDBC Demo

  3. Enter a valid SQL statement and then click the "Query" button, the example below uses a fully qualified Virtuoso SQL statement requesting all records from the "Demo" database table "Customers" owned by the Virtuoso user "DBA".

    Figure 4.15. JDBC Demo

    JDBC Demo