* GREY=local LOCAL HTML version of Foils prepared 13 March 1997

Foil 19 Example - Using Weblogic's Oracle Driver

From Overview of Java Database Connection Basic Information Technology Course CPS616 -- Spring Semester 1997. by Udayan Parvate, Tom Pulikal (Geoffrey C. Fox) *

1 package tutorial.jdbc.oracle;
2 import java.sql.*;
3 public class myTest {
4 public static void main (String argv[] ) throws Exception
5 { //load the driver class from the local CLASSPATH
6 Class.forname("weblogic.jdbc.oci.Driver");
7 //connect to the database using the driver url and
8 // other properties like username, password and server
9 Connection conn =
10 DriverManager.getConnection("jdbc:weblogic:oracle:kayak",
11 "scott", "tiger")
12 //statement class is instantiated using the connection
13 // class for executing queries
14 Statement stmt = conn.createStatement();
15 stmt.execute("select * from empdemo");

Table Font Size


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 22 1997