Table->Modify. No changes,direct cancel raises error #1547
Details for the issue
What did you do?
I open a well working db, right click on table and tap modify, or open modify via menu. Immediately tap Cancel. Error pops up.
What did you expect to see?
What did you see instead?
Useful extra information
The info below often helps, please fill it out if you're able to. :)
What operating system are you using?
What is your DB4S version?
Did you also
The text was updated successfully, but these errors were encountered:
Never used these checks in the Tools menu before...
Maybe showing the result of the foreign key check on 'Cancel' might clarify a lot to the user...
I guess the issue may be closed.
…blems The message when there are problems and the user has made changes and accepted them must be different to the case when the user has cancelled and any possible changes have been already reverted by the dialog. In the first case the fault may be ours and we actually revert changes. In the second case, we know for sure the problems were there before editing the table. We warn user about it, since we already know. The last error from the DB is inappropriate for both cases because it hasn't been updated by the foreign-key check. Also fixed the typo in a function identifier. Room for improvement: maybe the check should be done before opening the dialog, so we don't let the user edit the table until the issues have been solved. See issue #1547
I made a change. It can actually be considered a bug, because the message from the database engine that we were displaying wasn't actually from this check, but from other previous operation.
I've also put two different messages for the case of accepting changes or cancelling them. In the second case we know for sure that our changes are not the reason for the failing check, so we warn the user to fix the problem himself.
Have you a copy of the database for confirming tomorrow that it's working for you as well? Otherwise, if you're interested, you can disable foreign keys in the pragmas tab, make some insertion incoherent to the foreign keys, and then reenable the foreign key. Then you can reproduce the same situation.
There is also room for improvement: maybe the check should be done before opening the
I can confirm the new clarifying message on 'Cancel'. Good to the point message and call to action.
Without knowing, my database has been "corrupt" (albeit benign) for quite some time without knowing. The check tools weren't around last time I used SB, so these are quite good new features.
Would it be an idea to add some option for a 'health' check on database save. E.g. a popup asking whether a check should be run before saving? In preferences it could be set as 'never', 'always', 'ask'
Yes, it might be helpful. But we won't see it in the near time, since we want to close all the relevant pending issues and freeze the interface texts for translation. Would you mind opening an enhancement request with the idea so it is not forgotten?