Re: Oracle8i with JDBC problem...

From: Rares Stanciulescu <rares_at_rds.ro>
Date: Thu, 24 Jun 1999 13:30:15 +0300
Message-ID: <377208B7.839E5ECC_at_rds.ro>


Try this connection type !

Rares

/*===================================*/

/*
compile with JDK 1.2
add the classes111.zip to the CLASSPATH
*/

import java.sql.*;

class JdbcTest {
public static void main (String args []) throws SQLException {
// Load Oracle driver

DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
// Connect to the LAN database named jupiter
Connection conn =
DriverManager.getConnection ("jdbc:oracle:thin:_at_jupiter:1521:orcl","scott", "tiger");

System.out.println ("OK");
// Query the employee names

Statement stmt = conn.createStatement (); ResultSet rset = stmt.executeQuery ("select * from dept");
// Print the name out

while (rset.next ())
System.out.println (rset.getString (1) + " | " + rset.getString (2)); }
} Received on Thu Jun 24 1999 - 12:30:15 CEST

Original text of this message