Autovalue field Embedded HSQLDB vs. Firebird

I have observed in my first attempt to use the embedded Firebird Base engine 5.4.5.1 (experimental features turned on) that the autovalue field is different in a way that may need to be looked at when converting existing database files.

The starting number for an Integer field using Autovalue in HSQLDB is 0 and Firebird it is 1.

I don’t know if I should file a bugzilla or not? This could be a problem and I do not see any bugzilla entries for it. I have simply rebuilt the tables and re-entered the data and all seems fine now. I had to fix a couple of macro items. (various reports that print via macro control of temp table records, etc.)

The Base app I tried to migrate is from a split HSQLDB 2.3 setup I have been using for about three years. It was originally designed and used as an HSQLDB 1.8 embed setup. I would like to return to embedded as it seems a little easier to share with others as an embedded setup.

When I tried to convert my tables manually by drag’n’drop from Calc to Base, or even Base to Base it was an absolute failure. I have read here that the new 6.1 is an improvement on this. I tried using it, but reverted to 5.4. That’s another story (form, report issues). The good news is everything else seemed to transfer well. I was able to copy and paste forms, queries, reports, and install saved macro files and they all seem to be doing fine now. Even the Access2Base macro library is good so far.

Thanks to the team for all the hard work getting Base and Firebird going. I am looking forward to great new version of the embedded data experience in LibreOffice.

Hello,

The auto value starting point is dependent upon the database. MySQL also starts at 1.

If it is an irritation to you, when you create a new table with an auto increment value, first reset the value:

alter table "YOUR_TABLE"  alter "YOUR_FIELD" restart with -1;

This starts with the value of zero.

Thanks for the SQL setting tip. I can work with either 0 or 1. I just had to figure it out for one of my transferred macros to work correctly. It was my poor code design from my early days in LO. Live and learn. I didn’t know if it would be of any concern to others migrating to the the Firebird version of Base. LibreOffice does what I need it to do (as bugs get fixed) and I like that a lot.