Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

No suitable driver found (JDBC)

807600Nov 13 2007 — edited May 28 2008
Hi,

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)
)
)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2008
Added on Nov 13 2007
9 comments
26,360 views