File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC Driver For Access, where, Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Driver For Access, where, Please help" Watch "JDBC Driver For Access, where, Please help" New topic
Author

JDBC Driver For Access, where, Please help

Key Young
Greenhorn

Joined: Sep 18, 2006
Posts: 19
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

Joined: Aug 08, 2006
Posts: 57
you can search your
Installation_dir\Java\jdk1.5.0_07\jre\lib

copy rt.jar and rename it as rt.zip
and browse


i think therefore i am
Wei Dai
Ranch Hand

Joined: Jun 22, 2005
Posts: 86
>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

Joined: Sep 18, 2006
Posts: 19
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

Joined: Jun 22, 2005
Posts: 86
>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

Joined: Sep 18, 2006
Posts: 19
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

Joined: Aug 08, 2006
Posts: 57
goto

folder options->view

uncheck hide extensions for known types
nelson christos
Ranch Hand

Joined: Aug 08, 2006
Posts: 57
goto

folder options->view

uncheck hide extensions for known types
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Driver For Access, where, Please help