Solved

Accessing MDB File sitting on Linux machine using java/servlet

Posted on 2004-04-26
8
1,483 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 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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java string replace 11 61
Java syntax, or is it Selenium 6 38
spring maven example issues 3 40
maven not picking latest jar instead picking old jar from .m2 12 46
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

756 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