• 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

java.sql.SQLException: No suitable driver

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By using windows 2000 server, jsp 1.2 , ms access 2000

I want to connect to the ms access but its giving me

java.sql.SQLException: No suitable driver

MY code is below...
**********************************************
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

// Make a connection to the ODBC datasource iCare

Connection con = DriverManager.getConnection("jdbc dbc:iCare", "","");

*************************************************
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Piyali

You need to configure required jar file in classpath.

Download it from here.
[ January 30, 2006: Message edited by: Chetan Parekh ]
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chetan !!!


Thx for the quick response... but i am not sure which jar file should i use and where to keep it

Plz provide me the steps ...
[ January 30, 2006: Message edited by: Piyali Mallick ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Piyali,
Typing with the caplock key down is the equivalent to yelling in a web forum and is considered rude.
Please go back and edit your previous post.

Thank you.
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am really sorry 4 that . I have edited it
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JDBC-ODBC Bridge libraries are in rt.jar which ships with your JRE.
You shouln't need to move anything to use it.
[ January 30, 2006: Message edited by: Ben Souther ]
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this thread would be more suitable in JDBC forum. What you people think?
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
set my clsspath like this ...
C:\j2sdk1.4.2_03\bin;C:\j2sdk1.4.2_03\jre\lib\rt.jar

still not able to connect...
what do i do...
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which driver are you using ?
Add the driver's jar file to the classpath.
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
still not getting which driver's jar r u talking about?
can u plz tell me in details .. i really need it..
plz help
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I didn't realize you were using "sun.jdbc.odbc.JdbcOdbcDriver"
It's part of your SDK, so you shouldn't have anything to do.

Do you still have the same error ?
java.sql.SQLException: No suitable driver ?
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Im still getting the error.
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
creating my DSN - iCare

ODBC data source Administrator
System DSN
Microsoft Access Driver(*.mdb)

DSN name is iCare
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
plz help me ... i have not got my answer.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try "java -version" and post the version information here.
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Error java.sql.SQLException: No suitable driver .. solved

U know what I was doing ... i was calling the page from my server... although I have made the DNS in my local server.. when I called the page from my local web server.. it works fine.....

Thank u all for your help and time !!! :-)
[ February 23, 2006: Message edited by: Piyali Mallick ]
 
I do some of my very best work in water. Like this 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