No suitable driver found (JDBC)
807600Nov 13 2007 — edited May 28 2008Hi,
I wanna connect to a remote database using Oracle - OraClient10g
I have code as...
class DBAcess {
public static void main(String ss[]) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@172.26.8.137:1521:ams10g", "user", "pass");
} catch (Exception ex) {
System.out.println(ex);
}
}
}
when i tried to run this code, i got
No suitable driver found for jdbc:oracle:thin:@172.26.8.137:1521:ams10g
please help!
thanks in advance...
below is the tnsnames entry
BNGDEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.26.8.137)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = AMS10G)
)
)