1、調(diào)入Form Builder,打開一個新的FORM
2、在表格級新建一個ON_ERROR觸發(fā)器
3、在ON_ERROR里輸入以下代碼:
begin
if
error_code=40100 then message('已在第一 條記錄!');
elsif error_code=40102 then message('您已在最后一條記錄,請先輸入處理此記錄,然后再輸入下一條記錄!');
elsif error_code=40200 then message('此項僅用于查詢參考,您無法更改此項!');
elsif error_code=40202 then message('此項必須輸入! 產(chǎn)生錯誤原因:您未輸入值,或您刪去了原有值!');
elsif error_code=40203 then message('值必須輸入完全! 產(chǎn)生錯誤原因:該項有定長要求!');
elsif error_code=40207 then message('您輸入的值不在有效范圍之內(nèi),請輸入有效范圍之內(nèi)的值!');
elsif error_code=40401 then message('您沒有修改或輸入任何新的記錄,無須保存!');
elsif error_code=40508 then message('編碼不能相同,不能有相同編碼的記錄,編碼必須唯一!');
elsif error_code=40509 then message('嚴重操作錯誤!,您可能輸入了一個空的記錄,無法保存記錄!');
elsif error_code=41802 then message('您只能在輸入新的記錄時使用[復(fù)制記錄]鍵,來復(fù)制上一條記錄!');
else message(error_type||'_'||to_char(error_code)||':'||error_text);
end if;
raise form_trigger_failure;
end;