Table fields from Mariadb to Base

I am connecting a Base client (Version: 6.1.3.2) to a remote mariadb
using the MySQL (JDBC) connector.

A form I had generated in Base needed a new field that had to be added
to the source (Base) query and the related (Mariadb) table.

Having added the new field to the table using the Base client, I
expected it to appear in the query which is of the form (SELECT * FROM
<tablename>). It didn't until I closed Base and restarted it.

Is this a bug? Known or new?

Best Regards

Harvey

I did not have any problem with this. I did this:

1) Created a new query from a current table in my database, Commentary. Use SQL, I added
        SELECT * FROM `Bible`.`Commentary` `Commentary`

2) Added a field to Commentary table.

3) Saved the table.

4) Saved the database. (Did you do this?)

5)I opened the query. (If your query was already open, you should have clicked the Run button.)

Dan

Hi Haevey,

Having added the new field to the table using the Base client, I
expected it to appear in the query which is of the form (SELECT * FROM
<tablename>). It didn't until I closed Base and restarted it.

How did you add the field? Tools → SQL? Or did you add it in the GUI.
If added through Tools → SQL a refresh of the tables is needed (View →
Refresh Tables). The GUI doesn't recognize automatically what has been
changed in this way.

Regards

Robert

Thanks for the input!

I added the field via the Base table GUI. Of course, I could have added
the new field explicitly to the query (so that the field may then
appear twice) (but why?). Maybe this behaviour is only evident with a
remote database?

Cheers
Harvey

A further input: my first action after updating the table was to go to
edit the form (to add the new field). The field did not show up in the
list of controls. It was this that made me open the query to check if
it were there. It wasn't, so I then opened the table, where it was
shown as expected, no data, as yet, having been entered in any of the
new fields.

Now I have slight doubts, having tried adding a new test field. This
field showed up when I opened the query, but was not to be seen in the
data control field of the form. In other words, maybe the order 'open
query/open form (for edit)' or the other way round, as in the
previously reported case, produces different results.

Cheers
Harvey

Hi Harvey,

couldn't see this behaviour in LO 6.2.5.2 on OpenSUSE 15, 64bit rpm
Linux. But my MariaDB is a local database. Think it is a problem of the
remote-connection to your database. The changing of the table must reach
the database and after changing the table inside the database the
information could be send back to the query.

Do you use parameters for the connetion to the database, for example
jdbc:mysql://«Host of database»:3306/«databasename»?autoReconnect=true

@Dan: If you add a field to a table for an external database the
Base-file must not be saved. There has nothing been changed in Base,
only in the (external) database.

Regards

Robert

Hallo Robert,

it seems that autoReconnect=true does the trick. I had been using the
MySQL(JDBC) method where there seemed to be no place to set the
autoReconnect option. Having switched to the pure JDBC method, I can
add autoReconnect=true and it works now as expected.

Many thanks!

Harvey

Ah but.....it seems to be not so simple...:-J
After setting the method to JDBC with the option autoReconnect=true, it
becomes not possible to edit the existing fields of the table. A new
field could be added, but the existing ones cannot be changed.

So I have to return to the MySQL(JDBC) option. However, it accepts
adding ?autoReconnect=true behind the database name AND the addition of
new fields is transferred to the forms function immediately.

In other words, the problem is solved, by adding the option
?autoReconnect=true behind the database name in every case.

Is that documented somewhere?

Many thanks again

Cheers
Harvey

Hi Harvey,

So I have to return to the MySQL(JDBC) option. However, it accepts
adding ?autoReconnect=true behind the database name AND the addition of
new fields is transferred to the forms function immediately.

In other words, the problem is solved, by adding the option
?autoReconnect=true behind the database name in every case.

Is that documented somewhere?

Known yes, at least to those who are used to dealing with the
idiosyncrasies of JDBC connection parameters through the LO db UI, but
documented generally, not so sure, possibly, here and there in the
relevant forums.

Alex