[Libreoffice-bugs] [Bug 122048] SQL TRIGGER does not properly display SQLSTATE message text in a Base form

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Dec 14 13:44:26 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=122048

--- Comment #2 from Drew Jensen <drewjensen.inbox at gmail.com> ---
Created attachment 147559
  --> https://bugs.documentfoundation.org/attachment.cgi?id=147559&action=edit
example database

Confirmed using Ubuntu 18.04.1, LO6.3Alpha1 and embedded firebird database.

The example file consists of an table CHECKS:
CREATE TABLE CHECKS( ID BIGINT NOT NULL PRIMARY KEY, ISSUED BOOLEAN, AMOUNT
DECIMAL(10,2));

A custom exception:
CREATE EXCEPTION EX_CHECK_ISSUED
'May not delete record for check already issued'; 

and the delete trigger;
CREATE TRIGGER DELETE_CHECK 
ACTIVE BEFORE DELETE ON "CHECKS"
AS
BEGIN
    IF (OLD."ISSUED" = TRUE) THEN
       EXCEPTION EX_CHECK_ISSUED;
END;

To reproduce you can open the attached file and attempt to delete a record with
ISSUED set to TRUE form the table view, and the trigger will display an error
dialog with our custom message.

Open the form, with a grid control, and as reported the delete is blocked but
the error message is not displayed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181214/4a2a3868/attachment.html>


More information about the Libreoffice-bugs mailing list