Servlet reading a MSAccess on Linux?

Hi!

I developed a servlet on a Win NT plataform accesing a Microsoft Access Database. It worked fine, but now I have to migrate to a Linux environment. The problem is that I don't know how to make the "connection" to the database, I mean, on NT I can go to Control Panel/ODBC Sources and define the database source. But how on Linux? I'm usin JDK 1.3 and JSDKEE 1.3.1.

Thanx

[402 byte] By [ctellez69] at [2007-9-26 3:03:38]
# 1

No *direct* way to do, workarounds exist.

MS Access is file-based, not network protocol. So you could use samba to get MDB file shared.

But Access protocol is more than just file: it is also dealing with complex file format and complex locking strategy. This is usually implemented by "driver" dll (msjet40.dll -- native and odbcjt32.dll). Linux does not have such DLL and will never have (but maybe you want to look at WINE, "Wine Is Not Emulator" www.winehq.org?)

There is also COM bridge in MS Java (and Sun has released one).

So you can have 2 workarounds:

1. Write your own "SQL helper object" which will get SQL string parameter and return, say, array or Collection of rows (or plain IResultSet) and write RMI wrapper around.

2. Try to use Sun's CAS (COM Access Service) to make calls to DCOM (configured to run on another Windows machine).

Any further explanations needed?

wwk_killer at 2007-6-29 11:03:47 > top of Java-index,Core,Core APIs...
# 2
No no ... it's oK!Thanks... you gave a great idea.
ctellez69 at 2007-6-29 11:03:47 > top of Java-index,Core,Core APIs...
# 3

Personally I wouldnt mess with any of that.... Id make the switch to mysql!!

locate the mm.mysql driver, Im sure a search would turn it up!!!!

I also found a script that can be used from access to convert your data to an sql script usable by mysql

I set that up on an access database a while ago, not sure how I did it, but I could provide the script if you really need it...

J.Prisco at 2007-6-29 11:03:47 > top of Java-index,Core,Core APIs...
# 4
What DCOM service allows access ODBC DataSources?
Remnahush at 2007-6-29 11:03:47 > top of Java-index,Core,Core APIs...
# 5
Is there not a JDBC-ODBC bridge in existence?
ejp at 2007-6-29 11:03:47 > top of Java-index,Core,Core APIs...
# 6

> Hi!

> I developed a servlet on a Win NT plataform accesing

> a Microsoft Access Database. It worked fine, but now

> I have to migrate to a Linux environment. The problem

> is that I don't know how to make the "connection" to

> the database, I mean, on NT I can go to Control

> Panel/ODBC Sources and define the database source.

> But how on Linux? I'm usin JDK 1.3 and JSDKEE 1.3.1.

> Thanx

Do the same thing. Linux can connect to your windows ODBC datasource remotely. Just put the full path in your connect statement.

BTW, what you are accessing is the Jet database engine. Its there even when MSAccess is not.

If you want to access the file directly on linux, then I dont think it will work. I dont think there is a linux program that reads Jet database files AFAIK.

_dnoyeB at 2007-6-29 11:03:47 > top of Java-index,Core,Core APIs...