• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Making Connection with database

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul...
 
Hold that thought. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic