Solved

Accessing MDB File sitting on Linux machine using java/servlet

Posted on 2004-04-26
8
1,471 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
  • 4
8 Comments
 
LVL 30

Accepted Solution

by:
Mayank S earned 63 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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 62 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
factorial example 4 40
configure dependency in POM for new database 3 25
check java version using powershell 13 92
Java: anonymous class 4 19
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
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…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

773 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