<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I would like to get data from and save data back to ODB files in my java application.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal">Also I wonder if there are any files that should be updated if tables get added etc. any other files in the ODB file?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you in advance for any light you can shed on this.<o:p></o:p></p>
<p class="MsoNormal">Graham<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">* <a href="http://programmaremobile.blogspot.co.uk/2009/01/java-and-openoffice-base-db-through.html">
http://programmaremobile.blogspot.co.uk/2009/01/java-and-openoffice-base-db-through.html</a><o:p></o:p></p>
<p class="MsoNormal">**  <a href="http://digiassn.blogspot.co.uk/2006/07/java-creating-jdbc-connection-to.html">http://digiassn.blogspot.co.uk/2006/07/java-creating-jdbc-connection-to.html</a><o:p></o:p></p>
<p class="MsoNormal">*** <a href="http://www.crazysquirrel.com/computing/java/basics/java-directory-zipping.jspx">
http://www.crazysquirrel.com/computing/java/basics/java-directory-zipping.jspx</a><o:p></o:p></p>
<p class="MsoNormal">**** <a href="http://www.oooforum.org/forum/viewtopic.phtml?p=257220&highlight=#257220">
http://www.oooforum.org/forum/viewtopic.phtml?p=257220&highlight=#257220</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:14.0pt;color:#0070C0;mso-fareast-language:EN-GB">Kind Regards
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:14.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:14.0pt;color:#0070C0;mso-fareast-language:EN-GB">Graham Weatherup<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:12.0pt;color:#0070C0;mso-fareast-language:EN-GB">Systems Engineer<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">SMRU Limited<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">Scottish Oceans Institute<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">New Technology Centre<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">North Haugh<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">ST ANDREWS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">Fife  KY16 9SR<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">T:             +44 (0)1334 479100<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ES-UY" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">F:             +44 (0)1334 477878<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="ES-UY" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">E:</span></b><span lang="ES-UY" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">            
</span><b><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><a href="mailto:gw@smru.co.uk">gw@smru.co.uk</a></span></b><span lang="ES-UY" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">W:          
</span><span style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><a href="http://www.smru.co.uk/"><span lang="EN-US" style="color:#0070C0">www.smru.co.uk</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">               
<a href="http://soi.st-andrews.ac.uk/"><span style="color:#0070C0">http://soi.st-andrews.ac.uk</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Webdings;color:#66CC33;mso-fareast-language:EN-GB">P</span></b><span style="font-size:10.0pt;color:#66CC33;mso-fareast-language:EN-GB"> Please consider whether you really need a hard copy of
 this email before printing it - thank you.<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="text-align:justify"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#0070C0;mso-fareast-language:EN-GB">SMRU LIMITED is a limited company registered in Scotland, Registered Number: 296937.  Registered Office:  5 Atholl Crescent</span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>