I have an app I want to convert to Oracle 9. But I am not sure what settings I need, and what needs to go into my classpath.
Here is a simplified version...
import java.sql.*;
import com.mysql.jdbc.Driver;
public class DBTest{
public static void main(
String[] args){
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
java.sql.Connection con;
con = DriverManager.getConnection("jdbc:mysql:///customer", "root", "");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("Select * from names");
while(rs.next()){
System.out.println(rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3));
}
rs.close();
st.close();
con.close();
} catch (SQLException se){
System.out.println("MYSQL: " + se);
} catch (Exception e) {
System.out.println("Excep : " + e);
}
}
}