Originally posted by felix thomas:
hi,
I have oracle 8,0,5 installed on windows 98 system.
i want to use the java-oracle JDBC driver in my java code.
could anyone tell me the steps how to do it and what drivers to download and how.
Hi,
U can download the driver from
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc805samp/jdbc805samp.htm Set the classpath to the driver...
U can use this
test program to test:
import java.io.*;
import java.util.*;
import java.sql.*;
class DbOraTest {
public static void main(
String[] args)throws PasswordException{
Properties x = new Properties();
x.put("user","scott");
x.put("password","tiger");
try{
String url= "jdbc

racle:thin:@8.95.0.234:1521:IFXT";
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(url, x);
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("select * from news");
while(rs.next())
{
System.out.println(rs.getString(1));
System.out.println(rs.getString(2));
}
}
catch(Exception e){
System.out.println(e);
}
}
}
HTH
Mahesh