Skip to Main Content

Java Database Connectivity (JDBC)

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!

]Data source name not found, and no default driver specified

843854Feb 8 2002 — edited Feb 11 2002
When I try to execute following code:
import java.sql.*;
public class ODBCTest
{
    public static void main(String args[]) throws Exception
    {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        Connection con = DriverManager.getConnection("jdbc:odbc:razer_s","razer","");
        Statement stmt = con.createStatement();
        stmt.executeUpdate("INSERT INTO test VALUES('1','one')");
        stmt.close();
        con.close();
    }
}
I get this exception:
Exception in thread "main" java.sql.SQLException: [unixODBC][Driver Manager]Data source name not found, and no default driver specified.

My configuration seems to be fine because I can browse
my datasource using DataManager. Does anyone have any suggestions?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2002
Added on Feb 8 2002
6 comments
208 views