A
Arved Sandstrom
Jackcess: http://jackcess.sourceforge.net/
I thought I'd throw it out there, maybe save someone else some pain.
You may find yourself in the situation where some system maintains its
data in an MS Access MDB, and that's not going to change any time soon.
If, as is not uncommon, the MDB is on a Windows share and your Java
client code is on UNIX or Linux, *and* your first attempts are with
MDBTools and unixODBC, the odds are pretty good that you'll run into a
file locking problem ("Can't alloc filename"; strace will indicate this
happens right after a futex() call).
I ran into this yesterday, and any amount of suggested tweaking of
smb.conf and of MS Access itself (and bear in mind you may not be able
to do the latter in some production situations) failed.
You'll typically confirm the problem by having no issues with your
client code if the MDB is local. Then ODBC and by extension JDBC+ODBC
works just fine.
Another free alternative is odbtp but that (unless you're writing PHP)
means installing a package on the MS Access machine, the client library
has a C API, and hence we're talking JNI.
So with some considerable skepticism I gave Jackcess a try. Turned out
to be rock-solid. Don't expect to be doing JDBC in this situation, nor
JPA - the API is completely different - but it's surprisingly powerful.
AHS
I thought I'd throw it out there, maybe save someone else some pain.
You may find yourself in the situation where some system maintains its
data in an MS Access MDB, and that's not going to change any time soon.
If, as is not uncommon, the MDB is on a Windows share and your Java
client code is on UNIX or Linux, *and* your first attempts are with
MDBTools and unixODBC, the odds are pretty good that you'll run into a
file locking problem ("Can't alloc filename"; strace will indicate this
happens right after a futex() call).
I ran into this yesterday, and any amount of suggested tweaking of
smb.conf and of MS Access itself (and bear in mind you may not be able
to do the latter in some production situations) failed.
You'll typically confirm the problem by having no issues with your
client code if the MDB is local. Then ODBC and by extension JDBC+ODBC
works just fine.
Another free alternative is odbtp but that (unless you're writing PHP)
means installing a package on the MS Access machine, the client library
has a C API, and hence we're talking JNI.
So with some considerable skepticism I gave Jackcess a try. Turned out
to be rock-solid. Don't expect to be doing JDBC in this situation, nor
JPA - the API is completely different - but it's surprisingly powerful.
AHS