• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Making Connection with database

 
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: 20980
31
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