This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 18541
    
    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: 3606
    
  60

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
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
cannot connect to microsoft access with jsp
Hibernate Dialect for MS Access
Connecting to DB Error
error when i run the program