https://bugs.documentfoundation.org/show_bug.cgi?id=122048
Bug ID: 122048
Summary: SQL TRIGGER does not properly display SQLSTATE message
text in a Base form
Product: LibreOffice
Version: 4.3.5.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: libreoffice-bugs@lists.freedesktop.org
Reporter: rssale...@gmail.com
Description:
I have a LO Base app using a split HSQLDB 2.3.2. It includes a table "checks"
that has a boolean column "issued". When issued is "true" I want to prevent
deletion of that row. So I created the following trigger to detect this
condition and prevent deletion:
CREATE TRIGGER "delete_check" BEFORE DELETE ON "checks"
REFERENCING OLD AS oldrow
FOR EACH ROW WHEN (oldrow."issued" = true)
BEGIN ATOMIC
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Issued check cannot be deleted';
END;
When I use the built-in grid view and try to delete a row with the issued flag
set, the message box DOES pop up as expected.
But running in a Base form and trying to delete the row using the form
navigation control, the message box does not pop up. (In either case the row is
not deleted, which is good because it means the trigger is working.)
Deleting from the 'Toolbar' navigation bar does not generate the message and
once tried it also negates the display of the message from the form navigation
control.
This does start working once the form is closed & opened again.
Steps to Reproduce:
1.create HSQLDB before delete trigger as shown above
2.attempt to delete record that matches the trigger condition using form
navigation control
3.expected message box does not appear
Actual Results:
no message box is displayed
Expected Results:
message box with error message should be displayed
Reproducible: Always
User Profile Reset: No
Additional Info:
See
https://ask.libreoffice.org/en/question/175909/how-to-get-sql-trigger-to-display-sqlstate-message-text-in-a-base-form/
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs