On 2022-10-23 22:20, Carlos E. R. wrote:
After several years, I'm finally progressing with LibreOffice Base.
I have a catalogue of my books in MySQL, done with the application Rekall (KDE3). The app is not maintained, so I have been trying for years to migrate to something else, the obvious one LibreOffice Base.
It is more difficult that Microsoft Base, which I learned to use without documentation in a month back in 1998.
It appears that the trick is that to write to my table I have to use a form, not a table. See what I have (created by the wizard, then modified):
<https://susepaste.org/56891822>
Top is the table as is, and in the subform below are the controls.
See the first row, with a "0_test" book selected. The same book is displayed below. The data Autor, SegundoAutor and TercerAutor display the numbers 1, 2, 3, corresponding to an auxiliary table of authors. The entries below in white background show the text, the names of the first author, second and third, selectable from the list. This has been the hurdle for years (true, I have not dedicated intense study to it).
(In Rekall, or in Office, I get the name of the authors directly in the main table. It knows how to handle the relationship automatically, r/w. It was trivial).
And finally, I have a working form that I'm happy with: https://susepaste.org/64405591 It has been created with the Form Wizard, then modified. I don't care much about visual perfection. Positioning everything perfectly takes a lot of time, and as this is just for my personal use, I don't need more. I can modify it in years to come, anyway :-D The top part that seems a read only excel table takes the data from a query, done with "Create query in design view". It does the same thing as "Create view", except that it saves to the LO file instead of to the mysql table (that's the difference to my untrained eye). A view, once saved, is impossible to get the design view again. Working from a query is necessary so that numeric entries such as "Author" are converted to their name. This is done graphically in the design editor, no need to play with SQL code. The bottom part is a "subform", created by the wizard, and pulls from the Table (books) itself. It is read write. The wizard creates numeric boxes for Author and such (the boxes are still visible at the bottom). Instead I created drop lists that pull from their respective small mysql tables. I may still create forms for creating new authors, genres, etc, or not. They are simple tables, can be managed directly on their tables. The database was created, well over a decade ago, using "Rekall". It is abandonware. I'm using an old version (2018) that still runs in Leap 15.3 (by locking the packages). It is a KDE 3 application. It used a trick: it adds a __RekallObjects table to the database, to store some things it needs. Hidden relationships, I guess. Pity it was abandoned, it works very well. I used it the other day to change the size of a VARCHAR field. LO warns (in the docs) that this is not possible on an existing database, but Rekall does it fine. I also added a new field. Something I may still need is exporting the whole books table to a flat calc sheet, that I can then read in my mobile phone when going shopping for books. I did it once from Rekall to Google Calc, with LO Calc as intermediate. But that is a different problem. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)