James E. Lang wrote:
Dale Erwin wrote at 14:23 on 13 Sep 2005:
James E. Lang wrote:
Dale Erwin wrote at 13:12 on 12 Sep 2005:
James E. Lang wrote:
Oh, dear!
I just read elsewhere that OOo does not include a database engine but rather
that OOo uses a standard interface to an external database engine. I was
assuming that there was a database engine within OOo. This probably explains
my problem in that I have not first configured OOo to use an external
database engine.
OpenOffice.org 1.x.x does not include a database engine, but in
OOo 2.0 (still in beta, but stable) there is a database engine
integrated into it, even though it was not developed by the
OOo team. It is HSQLDB. Its integration into OOo was done by
a joint effort of the OOo team and the HSQL team.
<http://hsqldb.org>
Thank you for this information. It is good to know.
Unfortunately the response I received on the Help forum for HSQLDB said, "We
do not deal with the user interface of OOo." This leaves me with my initial
problem of being unable to reliably set the default value for BOOLEAN fields
to be Yes (TRUE). It was suggested that I try the SQL command SCRIPT 'logfile'
which showed me that there is no DEFAULT clause in the definitions. I suspect
that the problem is *not* caused by HSQLDB though I have posted this
information there as well.
I wish I could state that the result is consistent since that would make it
much easier to track down the fault. Usually the default value for these
fields reverts to No (FALSE). Sometimes the length attribute of these fields
changes to zero (0). On rare occasions these field definitions have been as I
intended them to be. The database that I'm creating will have ten tables with
up to seven BOOLEAN fields in a single table. Most of the BOOLEAN fields need
to default to Yes (TRUE).
Here's an idea:
For each database, HSQLDB creates four files (I'm not sure
just where they will be located for OOo databases and if it's
a Windows system I'm not sure how you look at the extensions).
SuSE 9.3 Linux
The files are named:
<DataBaseName>.backup
<DataBaseName>.data
<DataBaseName>.properties
<DataBaseName>.script
Everytime a connection is made to a database, it uses these
files to recreate the database structure. In the .script
file you will find all the DDL (Data Definition Language)
SQL statements to create the database. Look for the CREATE
TABLE for the table in question and see how the Boolean column
is defined. It should look something like this:
<columnName> BOOLEAN NOT NULL DEFAULT <False>
You can edit that file with a text editor and change False
to True. The NOT NULL may or may not be there. If NULL is
allowed, then there's no real need for a default.
If it's already set to <True> then there is a problem somewhere
and probably should have an issue filed on it.
Thank you Dale. It sounds like you have come up with a work around for this.
I'll give it a try and report back. ... Oops! Those files do not exist on my
system. Just guessing, but is it possible that these files are compressed
together into the single .odb file? If so, how should I extract and repackage
them so that they can be manipulated by a text editor and saved again?
Yes, it looks like those files are somehow embedded into the .odb
file. I guess my idea is not feasible in this case.
I have finally had a chance to bootup my WindowsXP system and
give the OOo2.0beta2 a trial run. I don't really find the Base
component to be very intuitive and there is no documentation
for it yet. I'm especially disappointed that there is no way
I have found to define Foreign keys and to implement constraints
based on them.
I may scrap my plans for an OOo database app and just develop
it in Java. Before that, though, I am going to explore one
more possibility: It may be possible to create my database
outside of OOo and then import it.
--
Dale Erwin
Salamanca 116
Pueblo Libre
Lima 21 PERU
Tel. +51(1)461-3084
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]