hi
I am trying to connect to a local oracle database. But when I attempt to connect to the database I get the below error. Can someone tell me whats going on.
The program gets past the first line Class.forName(............
but when it gets to the second line it throws the exception
but when it gets to the second line it throws the exception
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.*;
public class SimpleConnection{
public static void main(String args[]){
Connection connection = null;
try{
System.out.println(0);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
System.out.println(1);
connection = DriverManager.getConnection("","scott","tiger");
System.out.println(2);
Connection connection = null;
try{
System.out.println(0);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
System.out.println(1);
connection = DriverManager.getConnection("","scott","tiger");
System.out.println(2);
}
catch(Exception e){
e.printStackTrace(System.out);
}
}
}
ERROR MESSAGE
0
1
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:535)
at java.sql.DriverManager.getConnection(DriverManager.java:175)
at SimpleConnection.main(SimpleConnection.java:16)
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
_______________________________________________ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
