ODB Files

Graham Weatherup graham at weatherup.co.uk
Mon Jul 9 07:53:26 PDT 2012

I would like to get data from and save data back to ODB files in my java application.

I have read a description of how to access an hsql* and got it working which gets data out of the database and edits the extracted hsql DB.

The above link also directs to a description of how to unzip it in java** so I figured I should be able to zip the files up and open it again with Open Office. When I zip the files with java.util.zip using the method here***  the file called 'mimetype' comes out "compressed" but actually bigger and even setting compression off in the its still bigger but not as much 41bytes vs 43bytes (I don't remember the numbers exactly) but not the 39bytes that is required. Also I read on a linux forum that I cannot find that mimetype has to be 'at the beginning' of the file.

Using 7zip to zip the files has worked so far but I need a way to build this into my java application and preferably without building 7zip in and calling it.
Also I wonder if there are any files that should be updated if tables get added etc. any other files in the ODB file?

Preferably it would be very nice to edit the .odb file directly or pole changes to it (like open office or libre office) as talked about in OOoforum**** so data is not lost during a crash, but I cannot get a response from there.

Thank you in advance for any light you can shed on this.

* http://programmaremobile.blogspot.co.uk/2009/01/java-and-openoffice-base-db-through.html
**  http://digiassn.blogspot.co.uk/2006/07/java-creating-jdbc-connection-to.html
*** http://www.crazysquirrel.com/computing/java/basics/java-directory-zipping.jspx
**** http://www.oooforum.org/forum/viewtopic.phtml?p=257220&highlight=#257220

Kind Regards

Graham Weatherup
Systems Engineer

SMRU Limited
Scottish Oceans Institute
New Technology Centre
North Haugh
Fife  KY16 9SR

T:             +44 (0)1334 479100
F:             +44 (0)1334 477878
E:             gw at smru.co.uk<mailto:gw at smru.co.uk>
W:           www.smru.co.uk<http://www.smru.co.uk/>

P Please consider whether you really need a hard copy of this email before printing it - thank you.

NOTICE OF CONFIDENTIALITY: This message, and any attachments, are intended solely for the addressee and may contain privileged or confidential information.  If you are not the intended recipient, any disclosure, copying, distribution or action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.  If you believe that you have received this email in error, please contact the sender immediately and destroy this email.  Although we have taken steps to ensure that this email and any attachments are free from any virus, we advise that, in keeping with good computing practice, the recipient should ensure they are actually virus free.

SMRU LIMITED is a limited company registered in Scotland, Registered Number: 296937.  Registered Office:  5 Atholl Crescent

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120709/688063c0/attachment.html>

More information about the LibreOffice mailing list