Add or Ammend Info in Base Tables

I have ammended or added information in Base Tables only to find I have corrupted my database. Would this be normal and if so is there a way that Tables could be protected so that this cannot happen. I am thinking of situations where others might have access to a database.

Using Firebird on LO vers 6.4 on Windows 10. I thought I had a backup, save as new version each month. Have now discovered it became corrupted last month.

@Lismurn,

Responding here is simply responding to the original poster - yourself! You should respond under the answer you are responding to. Get no notification that you responded this way. If I had not been reviewing, you may not get a response for a very long time.

Not sure what database you are using - Firebird server? Embedded? File? Have used them all.

If it does not contain personal information can you post? Unusual for Firebird DB to go bad. Edit original question with it. Do not use an answer.

Using Firebird on LO vers 6.4 on Windows 10.
Yes, I would be willing to share as long as it wasn’t public. Perhaps the database is not corrupt.
My Database is made up of two tables, Marriage and Birth/Baptism. Sometime recently the ID AutoValue in both tables stopped, I had been amending some information in the tables but when I tried to add information through the Form it wasn’t accepted.
I tried to change the current IDs’ to AutoValue but, of course, that wouldn’t work, so I tried to introduce new ID fields but I was unable to turn them to “Yes” for AutoValue.
There is bound to be a simple solution to this problem but What Is It?

Hello,

Difficult to present an answer.

It is not normal for a DB to be corrupted by adding data. An exception may be if the Database were HSQLDB embedded and to this you were adding large amounts of data.

You state little in the way of what you are using - no database specified; LO version; OS.

Normally when performing something of this nature, a backup is best in case something goes wrong.

Edit 2020-07-04:

Converted to Firebird file and repairde per link noted in my comment:

Repaired file------- Database, Marriage & Baptism 20.07.asklib.odb

Using Firebird on LO vers 6.4 on Windows 10. Yes, I would be willing to share as long as it wasn’t public. Perhaps the database is not corrupt. My Database is made up of two tables, Marriage and Birth/Baptism. Sometime recently the ID AutoValue in both tables stopped, I had been amending some information in the tables but when I tried to add information through the Form it wasn’t accepted. I tried to change the current IDs’ to AutoValue but, of course, that wouldn’t work, so I tried to introduce new ID fields but I was unable to turn them to “Yes” for AutoValue. There is bound to be a simple solution to this problem but What Is It?

@Lismurn,

Corrupt and no auto increment are very different. Firebird & setting auto increment from No to Yes is a problem and there is no simple solution. Have not seen any error which causes this except human intervention.

The complexity here is the probability that you have links from one table to another. So the id’s need to remain as is for proper record connection.

First, always have a backup safetly stored away.

You will need to create different tables with the auto increment and copy data from the existing tables to the newly created tables. Then reset the auto increment numbering. For that see → Re-setting the primary key in Firebird embedded databases after deleting records

Despite many attempts to create AutoValue tables using my existing tables content I gave up and decided to build again using HSQLDB and then trying to migrate to Firebird. My database has dates which are all in text form and I have no photographs. When I open a form I get the following message:- "The data content could not be loaded. firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -206
*Column unknown
*LINK_FROM_ID
*At line 1, column 61
caused by
‘isc_dsql_prepare’

Everything in my main form is ok but the link is not being made to the subform. Is there anything I can do to migrate to Firebird or should I just be content with HSQLDB which I believe is much slower.
I have added the SQL for both marriage and baptism tables.

SELECT “Marriages”.“ID” AS “ID”, “Marriages”.“Source” AS “Source”, “Marriages”.“Church” AS “Church”, “Marriages”.“Register_No.” AS “Register_No.”, “Marriages”.“Marriage_date” AS “Marriage_date”, “Marriages”.“Groom_Surname” AS “Groom_Surname”, “Marriages”.“Groom_1st_Name” AS “Groom_1st_Name”, “Marriages”.“Age” AS “Age”, “Marriages”.“State” AS “State”, “Marriages”.“Occupation” AS “Occupation”, “Marriages”.“G_Marriage_Address” AS “G_Marriage_Address”, “Marriages”.“G_Fathers_Name” AS “G_Fathers_Name”, “Marriages”.“G_Father_Occupation” AS “G_Father_Occupation”, “Marriages”.“Bride_Surname” AS “Bride_Surname”, “Marriages”.“Bride_1st_name(s)” AS “Bride_1st_name(s)”, “Marriages”.“B_Age” AS “B_Age”, “Marriages”.“B_State” AS “B_State”, “Marriages”.“B_Occupation” AS “B_Occupation”, “Marriages”.“B_Marriage_Address” AS “B_Marriage_Address”, “Marriages”.“B_Fathers_Name” AS “B_Fathers_Name”, “Marriages”.“B_Father_Occupation” AS “B_Father_Occupation”, “Marriages”.“Witness_1” AS “Witness_1”, “Marriages”

SELECT “Baptisms”.“ID” AS “ID”, “Baptisms”.“MarriageID” AS “MarriageID”, “Baptisms”.“Source” AS “Source”, “Baptisms”.“Church” AS “Church”, “Baptisms”.“Record_No.” AS “Record_No.”, “Baptisms”.“Child_Name” AS “Child_Name”, “Baptisms”.“Born_Date” AS “Born_Date”, “Baptisms”.“Baptism_Date” AS “Baptism_Date”, “Baptisms”.“Father_1st_Name” AS “Father_1st_Name”, “Baptisms”.“Father_Surname” AS “Father_Surname”, “Baptisms”.“Mother_1st_Name” AS “Mother_1st_Name”, “Baptisms”.“Mother_Surname” AS “Mother_Surname”, “Baptisms”.“Address” AS “Address”, “Baptisms”.“Notes” AS “Notes” FROM “Baptisms” “Baptisms”

@Lismurn

Edit:

Just remembered that error - See this post → Firebird migration of existing database - error code = -206

If still with problems, submit file as stated below.

End Edit

There is no realistic way to help without the Base file. Just make a copy, delete the personal data (just the data and not the structures) and post. Doesn’t matter if Firebird or HSQLDB or both. Both should work and there must be something incorrect in what you have.

Your Select statements mean nothing. The first one isn’t even complete. Can’t make any determination from the error provided. Images typically will NOT help.

Database attached is in HSQLDB and is the one I tried to convery to Firebird. Ihave left one amended record to let you see a sample of the records. Bride and Groom names are the same but have to be inputted separately. I looked at the link mentioned above but it means absolutely nothing to me, sorry. I very much appreciate your willingness to help, many thanks.

link text

Attached is link to my database, I have left one amended record to let you see how it is structured. Bride and Groom names although the same are not linked, they have to be entered separately. I looked at the link above but sorry, I am completely out of my depth at that level. I appreciate very much your willingness to help, thank you.

link text

@Lismurn,

See edited answer for fixed file. Converted to Firebird & the applied the fix per the link in my comment.