This week's book giveaway is in the Design forum.
We're giving away four copies of Mastering Non-Functional Requirements and have Sameer Paradkar on-line!
See this thread for details.
Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Making Connection with database  RSS feed

 
yunuss khan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

i m getting below error when i m trying to make conncetion in jsp.

Error occurred java.lang.ClassNotFoundException: jdbc.odbc.JdbcOdbcDriver Error occurred java.sql.SQLException: No suitable driver Error occurred java.lang.NullPointerException

my code is :

Connection conn = null;
ResultSet result = null;
Statement stmt = null;

Class c = Class.forName("jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc dbc:master","","");
stmt = conn.createStatement();
result = stmt.executeQuery("SELECT * FROM Employees");

i m using sql 2000.

pls help.

thanks in advance.

yunus
 
Paul Clapham
Sheriff
Posts: 22215
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name of the class is "sun.jdbc.odbc.JdbcOdbcDriver", is it not?
 
yunuss khan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!