• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1527
  • Last Modified:

Accessing MDB File sitting on Linux machine using java/servlet

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
rajgk
Asked:
rajgk
  • 4
2 Solutions
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
Makre sure you have the correct driver.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>>  Makre

Make....
0
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!

 
rajgkAuthor Commented:
Hi mayankeagle

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

Note: There are no windows machines involved here.

Raj
0
 
nikrulzCommented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
Please proceed with that recommendation.
0

Featured Post

Technology Partners: 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!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now