Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Driver For Access, where, Please help

 
Key Young
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1 : I am trying to create a quick demo using JSP to access database. I am using Microsoft Access. I know that I need to put the driver jar file in the WEB-INF/lib directory. Where can I get the driver jar file or the driver class file for Microsoft Access ? If I have the driver class file where should I put it.

Q2 : It is said that sun.jdbc.odbc.JdbcOdbcDriver is included in the JDK but where is it included. Is there anyway that I can see it in the hard drive after I install the JDK.
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can search your
Installation_dir\Java\jdk1.5.0_07\jre\lib

copy rt.jar and rename it as rt.zip
and browse
 
Wei Dai
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>Where can I get the driver jar file or the driver class file for Microsoft Access ?
It's at http://www.hxtt.com/access.html .

If you use free jdbc-odbc bridge driver, you needn't to set WEB-INF/lib, but your web host should be Windows OS.
 
Key Young
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nelson and Wei.
I have extracted the rt.jar and found the JdbcOdbcDriver.class file. Can I just copy this file into the WEB-INF/classes directory.

Wei, I have browse to the site at www.hxtt.com but it looks like I have to pay to get the driver. Wei, I am not sure what you meant by
" If you use free jdbc-odbc bridge driver, you needn't to set WEB-INF/lib, but your web host should be Windows OS "
Do you mean if I run Tomcat on windows XP than I don't need to put the driver jar file in the lib directory.
 
Wei Dai
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>Do you mean if I run Tomcat on windows XP than I don't need to put the driver
> jar file in the lib directory.
Yeah. rt.jar can be visited by Java VM in default. You need a dsn-less JDBC url, for instance,

"jdbcdbcRIVER=Microsoft Access Driver (*.mdb); "
+"DBQ="+database+"; "
+"ImplicitCommitSync=Yes; "
+"UserCommitSync=Yes; "
+"Threads=3; "
+"SafeTransactions=0; "
+"PageTimeout=5; "
+"MaxScanRows=8; "
+"MaxBufferSize=2048; "
+"DriverId=281; "
+"DefaultDir=C:/Program Files/Common Files/ODBC/Data Sources"
 
Key Young
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Wei and Nelson, I have successfully access Microsoft Access DB in my JSP page without having to put the driver in the lib or classes directory.

However,Nelson I don't know how to change rt.jar to rt.zip. I try to rename it to rt.zip it became rt.zip.jar.

Also Wei I am not sure what you mean by the following :

"jdbcdbcRIVER=Microsoft Access Driver (*.mdb); "
+"DBQ="+database+"; "
+"ImplicitCommitSync=Yes; "
+"UserCommitSync=Yes; "
+"Threads=3; "
+"SafeTransactions=0; "
+"PageTimeout=5; "
+"MaxScanRows=8; "
+"MaxBufferSize=2048; "
+"DriverId=281; "
+"DefaultDir=C:/Program Files/Common Files/ODBC/Data Sources"

Can you guys give a bit more clue on this ?

Thanks again for your help.
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
goto

folder options->view

uncheck hide extensions for known types
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
goto

folder options->view

uncheck hide extensions for known types
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic