Stability Base and Basic?

Hello everyone,

I’m new to LibreOffice and would like to start using Base to develop an application in LibreOffice Basic.

I have a few questions:
1. How stable is the LibreOffice Basic development environment?
2. How stable is Base?
3. Is the embedded Firebird database a good choice?
4. What are the main do’s and don’ts for building a stable Basic application in Base?

Thanks in advance for your advice.
John

————————-
LibreOffice V25.8
MacOS V15.6
————————-

This is not a database development suite. It is just a tiny addition to this office suite, nevertheless quite powerful. On a Linux system, the optional Base component takes no more than 35 MB including various database drivers.

  1. Stable (no crashes)
  2. depends
    2.1. Stable (no crashes) when using forms and reports.
    2.1. Unstable. Some crashes while developing forms and reports. Recovery works well.
  3. No. Embedded databases are evil, and FB is still in experimental state.
  4. Do not even think of developing any “Basic application” until you are very familiar with the dos and don’ts of the core functionality.
1 Like

Thanks for taking the time.

  1. I’ve already experienced some crashes while experimenting with forms. I was afraid that the same level of (in)stability would occur when using forms regularly. Your answer has at least reduced my worries considerably.

  2. Yes, I expected an answer like that. Would a Firebird server be a good alternative? Or MariaDB?
    Does the connection between Base and external database servers work reliably and stably?
    Should I expect any problems because I’m using macOS?

  3. That’s why I’m asking. :slight_smile: I was hoping to find a link with documented experiences from others, especially regarding the don’ts.
    I’ve started developing a small application just to try things out and gain some experience. I’ve already fallen into one or two pitfalls — nothing dramatic, though.

depending how much time you have to spend on the case …
https://community.documentfoundation.org/t/developer-hiring-proposals/13043
Who destroyed base?
Dependency tree for Bug 120062 [META] Database related bugs and enhancements

2 Likes

IMHO stability we have for the core features of BASIC and Base.
On the downside there is not much of the modern like code completion etc. we are used to now in modern IDE.
I don’t miss much, as most of my macros are small.
.
A problem with stability has the report-generator. If you have a working report, that is quite stable, but designing them or changing is not nice… (Save often and be prepared for trouble). But lucky as we are, there are often ways around it.
.
“Embedded Firebase” is two questions in one.

  • embedded is a problem. When LibreOffice crashes you could loose the database. The only benefit is the ability to send around the database, with all forms for example by email and the receiving site can directly open it. I use this only in one case. The person who fills this reported once a crash, with loosing 2 hours of input after installing a newer version on his Mac. (I guess he has worked 800 of this files over the last years.)

  • I prefer external databases and my setup for a system, where you need to send data around is an external sqlite-file used as a named datasource. Usually I don’t need to change the .odb (form/report) often, so all I send is the data in the sqlite file.

  • If sending around databases is of no concern you can use HSQLDB, Firebase, MariaDB, Postgres etc. For most of us differences will not matter much after setup. But choose wisely, as moving from one DB to another is often difficult, as there are small differences in the SQL. (My choice was MariaDB, a bit biased as we already had one on our web-server and it was also available on the NAS we had.)

The were time where I would have doubted BASIC and stability could be combined…
But the main point is how do you code. Think ahead and take nothing for granted:

  • I have a working macro, sometimes failing (no BASIC error) It creates a database reports, saves it and creates an email in Thunderbird including the appended report. Sometimes Thunderbird tells there is no file to append. I could add more time for the file-system to have everything ready, but as I know how to append myself, I simply leave this imperfection…
  • I had a macro to write a filename in a field to show a picture. Works. But it was not stable to do this when your mouse is over the image-control in my form. Sometimes the macro was executed, while scrolling the database whith a grid-control. Then it crashed, because there was no valid position in the database.

This are simple examples. But the main rule for stability is test, if your resources are available. Check if you were successfull or have an error-code. For a new project I would prefer a python try-block to old BASIC ON ERROR GOTO

And: Let the database do the heavy stuff. Sure were can code a quicksort in Basic, but let the database do this. Try to understand SQL and Base and avoid coding yourself as much as possible.

1 Like

If you don’t need a server: Try Firebird with external Firebird file. Will be created when trying to connect to an external Firebird file and the file doesen’t exist.
If you need a server: Take MariaDB or PostgreSQL. Both are supported by direct connections. It is possible to get a connection to Firebird server, but it won’t run in multi user mode with Firebird driver from LO. So you would need JDBC or ODBC-connection.
… and if you want to test an application with much forms, much queries and view, also Basic macros and external templates: Try this https://wiki.documentfoundation.org/images/4/4f/XRechnung_Extension_2508.zip - it’s a German construction for electronical invoices. Have created this for internal Firebird and then also ported to MariaDB.

2 Likes

Thanks all of you for your time.

I use MariaDB for database server. HeidiSQL to design tables. LO Base for query and forms. And Jaspersoft for reports. Have tried lots of other ways, but this is what I use every day now.

1 Like