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:
- Set up your development shell as described in Package examples.jdbc.mssqlserver4.
- 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.
- Compile this example by executing the following command in your development shell:
$ javac -d c:/weblogic/mssqlserver4/classes SelectApplet.java
- Run this example by executing the following command in your development shell:
$ appletviewer SelectApplet.html
-
SelectApplet()
-
-
init()
-
-
paint(Graphics)
- A method to display the message in the applet.
SelectApplet
public SelectApplet()
init
public void init()
- Overrides:
- init in class Applet
paint
public void paint(Graphics graphics)
- A method to display the message in the applet.
- Overrides:
- paint in class Container
All Examples This Package