Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Accessing MDB File sitting on Linux machine using java/servlet

Posted on 2004-04-26
8
Medium Priority
?
1,524 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 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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…
Suggested Courses

971 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