Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: No suitable driver

 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • 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", "","");

*************************************************
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I am really sorry 4 that . I have edited it
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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 ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • 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
  • 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...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Yes Im still getting the error.
 
Confused
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
plz help me ... i have not got my answer.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic