The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


How to create DSN... which driver to choose?

Posted by Gajju on November 21, 2000 at 8:50 AM

> Hai Gajju,

> ClassNotFoundException is thrown because of the unavailability of the
> Driver Class : oracle.jdbc.driver.OracleDriver.

> This driver is not provided as part of Personal Oracle.

> If this driver class is not available, try to use the JDBC-ODBC bridge itself.

> Driver Class: sun.jdbc.odbc.JdbcOdbcDriver
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
> Connection con = DriverManager.getConnection("jdbc:odbc:DataSourcename","username","password") ;

> With Regards,
> Elangovan.E


Shailesh, I tried To create DSN as per u'r code.
But, i took System DSN then which Driver should i select "Oracle ODBC Driver" or "Microsoft ODBC for Oracle" ?

I wrote the DSN name but i don't know the Service Name and userID. Are these field are compulsory?

still to go ahead i wrote shailesh as DSN, scott as userID and some junk as Service Name.

Then i got this error

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name

I think the problem is with the service name I don't know the service name, what should i write?

Pl. help me out.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us