By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

Error:java.sql.SQLException: Data source name not found

P: 1
error:java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
above error is shown,

i have used oracle10g as database

my code:
Expand|Select|Wrap|Line Numbers
  1. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  3.          Connection con=DriverManager.getConnection("jdbc:odbc:XE","SYSTEM","system");
  6.                         Statement st=con.createStatement();
  7.      ResultSet rs=st.executeQuery("select * from result");
Nov 14 '11 #1
Share this Question
Share on Google+
1 Reply

P: 22
after creating DSN test your connection first then compile your code and run.
Dec 19 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.