Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Accessing MDB File sitting on Linux machine using java/servlet

Posted on 2004-04-26
8
Medium Priority
?
1,508 Views
Last Modified: 2013-11-24
We have MS Access database file (a .mdb file) sitting on a
*linux* machine and shared across the LAN using Samba. Our
intranet application constantly updates the database.
 
Now, we have a java/servlet/jsp application on Jakarta Tomcat
running on another *linux* machine. We need to access the .mdb file
mentioned above, and create some reports on a hourly basis.
 
How do we access/read/update the database file mentioned above
from the servlet/jsp container in the above setup?

Raj
0
Comment
Question by:rajgk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
8 Comments
 
LVL 30

Accepted Solution

by:
Mayank S earned 252 total points
ID: 10925918
You just need:

Connection con = DriverManager.getConnection ( "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=<database-path>","<username>", "<password>" ) ;

- and I hope you know the rest about the java.sql package.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 10925923
Makre sure you have the correct driver.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 10925925
>>  Makre

Make....
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

Author Comment

by:rajgk
ID: 10926007
Hi mayankeagle

Does jdbc:odbc work between two *LINUX* machines???

Note: There are no windows machines involved here.

Raj
0
 

Assisted Solution

by:nikrulz
nikrulz earned 248 total points
ID: 10926247
openoffice.org provides drivers that can be used to talk to mdb databases from Linux.
The current version is mdb-sdbc-driver-0.1.0.
You can download this driver and use it as a bridge to connect to your mdb database.
This driver however is still in its alpha testing stage. But I guess it is worth a try.
The driver can be loaded as any normal JDBC driver.
The URL format is sdbc:mdb:mdb_filename.
You can check at the openoffice site for more details on this matter and the download instructions.

I hope this provides a solution

Regs
Nik
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 11162342
Please proceed with that recommendation.
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
A solution for Fortify Path Manipulation.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question