Database Check

Sometimes, when you make some changes to Object Specs in a diary, you may end up with some values that should be filled in not filled in, or alternatively you can end up with extra values stored against the records. JXCirrus Diary and JXCirrus Project perform constant checking of the database to make sure there aren't any missing or extra values. If it finds problem values, then it will warn you by displaying messages in the alerts box in the top left of the main window. These errors don't cause any real problems with the system (just inconsistency), so you can carry on working as long as you like.

Fixing Errors

These are the type of messages you may see:

Extra Variables

This happens when you remove a variable from a spec. The reason that the system leaves the value in the entry is that it doesn't want to accidentally delete your data if you inadvertently change a spec.

Edit the entry, and then go to the Properties tab and press the "Remove" button next to Redundant Fields.

Un-filled Variables

This often comes up when you add a new variable to a spec which is set to "prompt()". Because the variable has been added to the Entry but never filled, the Database Check will complain.

Edit the entry, and fill in the variables on the main form. As long as the cursor is moved into the field, it is considered filled.

Extra Children

This happens when you remove a child object.

Go to the entry and delete the child entry that shouldn't be there.

Some Tricks

Unfilled Variables

There is a good way to get around this...

  1. In the Object Spec, initially set the value to $<MyVariable> = init("");
  2. In the Database Schema dialog, select the Build -> Apply Chnages. This will set your new variable to empty for all existing entries.
  3. Now modify the Spec a second time, but set $<MyVariable> = prompt(); This time, the variable has a value already, so it won't be prompted for. It will get picked up in any new entries.

Extra Variables

There is a trick to get around this... The system will happily remove any empty variables - So set the variable to blank before removing it.

  1. In the Object Spec, change the value to $<MyVariable> = eval(""); This will clear the value out of the variable.
  2. In the Database Schema dialog, select the Build -> Apply Changes menu option.
  3. Re-edit the Object Spec, and remove the variable. Because it is blank, the system will happily remove it.

Extra Children

One option is to painstakingly remove the extra entries. The other option is to change the child over to a "[-]" array (a no-new-values indicator).

$[Child] = ${Child}[-];

This means that it won't complain about existing children, but it won't create any new ones of that type.