All Examples  This Package
  Class examples.jdbc.mssqlserver4.sqlBrowser
java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----examples.jdbc.mssqlserver4.sqlBrowser
  -  public class sqlBrowser
  -  extends Applet
This applet allows you to connect to a database server, enter SQL
 queries, and see the results in a browser. If the applet does not connect to your database, make sure you
 change the 'connection' parameter in sqlBrowser.html to specify
 your SQL Server host.  The connection URL tells the applet which
 database on which host you're connecting to. Also make sure you
 specify a valid login and password on your server.  
To set up this example:
- Set up your development shell as described in Package examples.jdbc.mssqlserver4.
 
-  In the sqlBrowser.html
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 sqlBrowser.java
 	
 
- Run this example by executing the following command in your development shell:
$ appletviewer sqlBrowser.html
 
   
  -   sqlBrowser() sqlBrowser()
-  
   
  -   action(Event, Object) action(Event, Object)
-  
 Handle button events, including executing SQL user enters and displaying results.
  
-   clearLog() clearLog()
-   Clear the server panel in the applet.
  
-   init() init()
-  
 Set up awt objects in the browser, get database connection
 parameters from the .html file, and connect to the database.
  
-   log(String) log(String)
-   Append text to the server panel in the applet.
   
 sqlBrowser
sqlBrowser
 public sqlBrowser()
   
 init
init
 public synchronized void init()
  -  Set up awt objects in the browser, get database connection
 parameters from the .html file, and connect to the database.
   
- 
    -  Overrides:
    
-  init in class Applet
  
 
 action
action
 public synchronized boolean action(Event iEvent,
                                    Object iArgument)
  -  Handle button events, including executing SQL user enters and displaying results.
   
- 
    -  Parameters:
    
-  iEvent, - the button event.
    -  iArgument, - the button label.
    
-  Overrides:
    
-  action in class Component
  
 
 clearLog
clearLog
 public synchronized void clearLog()
  -  Clear the server panel in the applet.
 
 log
log
 public synchronized void log(String s)
  -  Append text to the server panel in the applet.
   
- 
    -  Parameters:
    
-  s, - the string to append to the server panel.
  
 
All Examples  This Package