All Examples  This Package

Class examples.jdbc.mssqlserver4.SelectApplet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----examples.jdbc.mssqlserver4.SelectApplet

public class SelectApplet
extends Applet
This applet opens a connection to a database and executes the simple SQL statement 'select 1'.

If this test fails, make sure that SocketApplet and ConnectionApplet work before you proceed.

To set up this example:

  1. Set up your development shell as described in Package examples.jdbc.mssqlserver4.

  2. In the SelectApplet.java file, change the database URL, login, and password connection parameters to correspond to your Microsoft SQL Server configuration. If you need more help, check the section on connecting to a database in the Developers Guide, Using WebLogic jDriver for Microsoft SQL Server.

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

    $ javac -d c:/weblogic/mssqlserver4/classes SelectApplet.java

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

    $ appletviewer SelectApplet.html


Constructor Index

 o SelectApplet()

Method Index

 o init()
 o paint(Graphics)
A method to display the message in the applet.

Constructors

 o SelectApplet
 public SelectApplet()

Methods

 o init
 public void init()
Overrides:
init in class Applet
 o paint
 public void paint(Graphics graphics)
A method to display the message in the applet.

Overrides:
paint in class Container

All Examples  This Package