Description Disappears

Creating tables and queries
Post Reply
User avatar
ubiquity
Posts: 20
Joined: Fri Aug 24, 2012 3:23 am
Location: Tasmania, Australia

Description Disappears

Post by ubiquity »

This has happened several times and is very frustrating.
When designing and constructing tables I add Field Name; Field Type; and Description (for proper documentation) then when I save the table with a name the description I have entered disappears.
I can re-enter the the Description when editing the table after it is named but surely it should be saved with the rest of the table structure when the table is first constructed.
OpenOffice 4.1.1
Windows XP Sp3
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Description Disappears

Post by UnklDonald418 »

It looks like this has been sitting unanswered for a month, perhaps no one is able to duplicate your issue.
The table design GUI has a number of idiosyncrasies, and while it is handy for looking up column names and definitions, for best results it should avoided when designing tables.
So, “for proper documentation ” it is best to create Base tables using the SQL statement CREATE TABLE. HSQL treats any text beginning with two dashes – as a comment so those SQL statements can be commented. Since a Base form is really a Writer document I often create a form “SQLsource” that includes the SQL statements needed to create each of the tables in my database.
HSQL also provides another mechanism for saving comments using the SQL statement
COMMENT ON { TABLE | COLUMN | ROUTINE } <name> IS <character string literal>
Adds a comment to the object metadata, which can later be read from an INFORMATION_SCHEMA view.
However, this is only available when using a split database, it will not work when using an embedded database.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
ubiquity
Posts: 20
Joined: Fri Aug 24, 2012 3:23 am
Location: Tasmania, Australia

Re: Description Disappears

Post by ubiquity »

Thank you I shall follow your advice.
OpenOffice 4.1.1
Windows XP Sp3
User avatar
Sliderule
Volunteer
Posts: 1279
Joined: Thu Nov 29, 2007 9:46 am

Re: Description Disappears

Post by Sliderule »

Just to add to the sound explanation given by user UnklDonald418, with HSQL Versions 2.3.X or 2.4.X ( NOT the Embedded database ), any COMMENT can be read ( obtained ) from the database using the built-in VIEW INFORMATION_SCHEMA.SYSTEM_COMMENTS .

For example, the following Query can be used:

Code: Select all

SELECT 
   INFORMATION_SCHEMA.SYSTEM_COMMENTS.OBJECT_SCHEMA, 
   INFORMATION_SCHEMA.SYSTEM_COMMENTS.OBJECT_NAME, 
   INFORMATION_SCHEMA.SYSTEM_COMMENTS.OBJECT_TYPE, 
   INFORMATION_SCHEMA.SYSTEM_COMMENTS.COLUMN_NAME, 
   INFORMATION_SCHEMA.SYSTEM_COMMENTS.COMMENT 
FROM INFORMATION_SCHEMA.SYSTEM_COMMENTS 
WHERE INFORMATION_SCHEMA.SYSTEM_COMMENTS.OBJECT_SCHEMA = CURRENT_SCHEMA 
ORDER BY INFORMATION_SCHEMA.SYSTEM_COMMENTS.OBJECT_TYPE, 
         INFORMATION_SCHEMA.SYSTEM_COMMENTS.OBJECT_NAME
Sliderule
Post Reply