yves piel wrote:
Hello,
I'm developping a java application which use an ms-access database via
jdbc/odbc bridge.
However, it seems that ms-access databases have to regularly been
compacted (for indexes and page size).
So how can I do it from java since I haven't got Access nor vb ?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Access DBEngine has to be running or you wouldn't be able to access
the data. That said, using Automation, you can use this command:
DBEngine.Compac tDatabase olddb, newdb, locale, options, password
From the Access Help file:
/begin quote/
olddb - A String that identifies an existing, closed database. It can be
a full path and file name, such as "C:\db1.mdb ". If the file name has an
extension, you must specify it. If your network supports it, you can
also specify a network path, such as "\\server1\shar e1\dir1\db1.mdb ".
newdb - A String that is the file name (and path) of the compacted
database that you're creating. You can also specify a network path. You
can't use the newdb argument to specify the same database file as olddb.
/ end quote /
Locale, options and password parameters are optional. Leave them alone
if you just want the same type, version, etc. as the oldDB. If the DB
is password protected set the password parameter to ";pwd=ThePasswo rd".
--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQxNMCYechKq OuFEgEQLBVQCgqh RZ3AC4uMSLOY9G0 ZmMOSV4gTwAoPWZ
sLqPxRtMVwgnFPy HABQCPtzm
=5G95
-----END PGP SIGNATURE-----