File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Data source name not found and no default driver specified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Data source name not found and no default driver specified" Watch "Data source name not found and no default driver specified" New topic
Author

Data source name not found and no default driver specified

siddharth das
Ranch Hand

Joined: Aug 17, 2007
Posts: 124
Hi,

I wrote a java program to connect database

The code is

But the connection is not happened, showing error
after loading....
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at TestJDBC.main(TestJDBC.java:18)

The database Oracle 11.2.0 Express edition.
I am not able to understand what exactly the problem.
Please suggest.

Thanks in advance,
Siddharth
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18127
    
    8



This looks like a JDBC URL which refers to an ODBC driver. But you don't want to use ODBC, you want to use Oracle's JDBC driver (which is a good choice). So check the documentation for your version of the JDBC driver and find out how to format the JDBC URL for that driver.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3435
    
  47

Our Oracle FAQ contains links to a description of JDBC URL formats of Oracle drivers. Links to driver documentation are there too.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data source name not found and no default driver specified
 
Similar Threads
error when i run the program
Connecting to DB Error
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Hibernate Dialect for MS Access
cannot connect to microsoft access with jsp