<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - SQL TRIGGER does not properly display SQLSTATE message text in a Base form"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=122048#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - SQL TRIGGER does not properly display SQLSTATE message text in a Base form"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=122048">bug 122048</a>
from <span class="vcard"><a class="email" href="mailto:drewjensen.inbox@gmail.com" title="Drew Jensen <drewjensen.inbox@gmail.com>"> <span class="fn">Drew Jensen</span></a>
</span></b>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=147559" name="attach_147559" title="example database">attachment 147559</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=147559&action=edit" title="example database">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>