On 2022-10-31 02:26, Robert Webb wrote:
On Sun, 30 Oct 2022 12:54:53 +0100, "Carlos E. R." <robin.listas@telefonica.net> wrote:
And finally, I have a working form that I'm happy with: https://susepaste.org/64405591
Excellent. This thread you have been posting has served as a useful tutorial for me.
:-)
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.
I recall reading that exporting to a calc sheet is the first step needed to export a database table to a CSV (comma separated values) file, and that only the field contents, with no meta-information, of a table is exported. I assume that means that your Autor fields that reference other tables will just contain the index numbers, which is not what you want. So, maybe you can export the view (query) that you posted above instead of the table itself, and thereby export the actual info you are interested in. If so, let us know.
Yes, that's exactly the thing. If the exporting is done from Rekall, it is not a problem because "somehow" when opening the table it knows how to display the text instead of the numeric index of author, genre, etc. It knows, even though there are no relationships defined in the sql. This was the hurdle I had for many years when using LO: it displayed the numbers and I did not know why. Rekall I think had this information in a special table inside the database. So yes, for exporting I will try using the table view or the query. Dunno which. Preferably the query. I see already that in the query I can not select all the fields for copy-paste somewhere else. Same thing in table Data View. I have to do more reading, because surely somebody else will have done the same before. Maye using a report, or perhaps creating a Calc Sheet that imports database data, which I read it is possible. IF it display author names, not IDs. Dunno. That part is nor urgent, though. At worst, I can access my database from my laptop, remotely, via an ssh tunnel to mysql :-DDD I hit tonight a new problem, though: in the form I have I can not create a new book entry. In the top half of the form, the table like view, new record button doesn't respond, because it takes data from a Query and thus, it is read only. In the bottom half of the form it does create a new record, yes, but the Index field displays "<AutoField>" and not a newly created index number. When trying to save the record, it says the number is a duplicate. I can not write a number by hand, either. I'm stuck there and have to close the form completely, without saving, to recover: Error inserting the new record /home/abuild/rpmbuild/BUILD/libreoffice-7.3.6.2/connectivity/source/commontools/dbtools.cxx:747 Duplicate entry '374' for key 'PRIMARY' /home/abuild/rpmbuild/BUILD/libreoffice-7.3.6.2/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:119 So I have to create a new record somewhere else, then edit with my form. I will need to solve this new problem somehow. My previous attempt at form creation works at creation of a new record, because the top half pulls data from the table directly (thus displays ID number instead of author names). The bottom half has, apparently, the same problem as my new form. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)