After watching some YouTube videos about Base, I recreated the STRUCTURE of my existing Recipe database into ver. 7.5 Base using Firebird.
My 3 tables looked like this:
My main form is based on tblRecipes, and
tblRecipeIngredients is a Subform that contains the ingredients in the recipe.
I then exported the data from my old database into Calc spreadsheets.
Then I appended this data into my new Base/Firebird structure.
The ID fields in my new tables were set to AutoNumber.
But I copied the ID fields in my OLD tables over into my NEW tables because it was important the numbers match up exactly (many items in the these tables had been deleted through the years, so the ID numbers were no longer exactly sequential).
I thought everything was fine… all my data copied over, and the recipe ID numbers matched up with the appropriate ingredient IDs from from tblRecipeIngredients.
But now I’m getting error messages when I try to add or modify the ingredients in the subform of a recipe, and it won’t save. Because I’m a new member to this group, LibreOffice won’t allow me to upload more than one picture, so the text of the error message is similar to:
firebird_sdbc error:
*violation of PRIMARY or UNIQUE KEY constraint “INTEG_4” on table “tblRecipes”
*Problematic key value is (“fldRecipeID” = 1187)
caused by
‘isc_dsql_execute’
In addition, when I view my tables, the relationships between the tables are now gone.
If I try to recreate the relationships, I get the following error:
firebird_sdbc error:
*violation of FOREIGN KEY constraint “INTEG_25” on table “tblRecipeIngredients”
*Foreign key reference target does not exist
*Problematic key value is (“fldRI_RecipeID” = 374)
caused by
‘ALTER TABLE “tblRecipeIngredients” ADD FOREIGN KEY (“fldRI_RecipeID”)
REFERENCES “tblRecipes” (“fldRecipeID”)’
Does this mean that I will not be able to copy the old data from my previous tables into my new database structure?