Pervasive PSQL JDBC Sample Applet

This is a sample application/applet that connects to a PSQL database, takes queries from the user and displays results. It requires connection parameters as inputs.

There are three ways to launch the applet:
  1. From a web browser.

    Copy the 3 PSQL JDBC jars (pvjdbc2.jar, pvjdbc2x.jar and jpscs.jar) into the sample applet folder. Make sure your web server and the PSQL Server are on the same machine and open DBSample.html in your favorite browser.

  2. From the applet viewer.

    Copy the 3 PSQL JDBC jars (pvjdbc2.jar, pvjdbc2x.jar and jpscs.jar) into the sample applet folder and do the following from the command-line:

    appletviewer DBSample.html

  3. From the java virtual machine (JVM) directly.

    Do the following from the command-line:

    set CLASSPATH=<PathToPSQLJDBC>\pvjdbc2.jar;<PathToPSQLJDBC>\pvjdbc2x.jar;<PathToPSQLJDBC>\jpscs.jar;<PathToDBSample>
    java DBSample

Try the following from the sample applet:
  1. Fill in the required fields:
    Server Name -- Host name or IP address of the PSQL server. If running DBSample as an applet through a brower, type the server name exactly as it appears in the browser's URL.
    Port Number -- TCP port number where PSQL's LNA is 'listening'. By default port 1583.
    Server DSN -- Data Source Name on the PSQL server.
  2. Click Connect and get database information by clicking Database Info or View Tables.
  3. After connecting, enter a SQL command and click Execute.
  4. To view the source code, click here.

DBSample


If the connect succeeds, the Connect button will become the Disconnect button.
© 1998-2008 Pervasive Software Inc. All rights reserved.