• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set classpath

 
dhriti joshi
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying to connect to microsoft,s access database on my machine through a java program,but i am getting classnot found exception.
i am using the method
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
please help.
thanks.
dhriti
 
sandeep balyan
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
import java.sql.*,javax.sql.*
hope it help
njoy regds
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhriti, you may need to post some code.
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And you need to put the JdbcOdbcDriver class (or the jar where its included) in the classpath.
 
jered veld
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi refer to the thread i posted not too long ago it may help you.
http://www.coderanch.com/t/297853/JDBC/java/mysql-jdbc-connection
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic