Basic HTML version of Foils prepared 23 June 1997

Foil 49 Example - Using Weblogic's Oracle Driver

From Overview of JDBC and its use with Microsoft Access UC Web Applications Certificate -- June 26 97. by Nancy McCracken(Sangetta Aggarwal, Udayan Parvate, Tom Pulikal)


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



© 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 Thu Jan 8 1998