• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

java.sql.SQLException: No suitable driver

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am trying to do simple jdbc program


can anybody help me to come out?

Thanks

Vaishali
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the jar containing your JDBC driver in your classpath?
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please can you tell me which jar file is needed in classpath.

I am using oracle 10g.

Thanks

Vaishali
 
author & internet detective
Posts: 42134
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's called classes12.jar or ojdbc-14.jar for Oracle.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes it has in classpath

"c:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\nls_charset12.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\classes12.jar"

Then also its giving error.


Thanks

Vaishali
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error message means that either the JDBC driver is not in your classpath, or that the database URL you are using is wrong. Looking at your code, I see that the database URL you are using is "jdbc:odbc:oracle". Are you trying to use the JDBC-ODBC bridge driver to access Oracle?

See this question in the Oracle JDBC FAQ about what the database URL should look like.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

"c:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\nls_charset12.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\classes12.jar"

This is in my class path and

I created 'oracle' as odbc in administrative tools.

I can't understand how to figerout problem.


Thanks

Vaishali
 
reply
    Bookmark Topic Watch Topic
  • New Topic