在 Squirrel 中创建/替换触发器
我用的是松鼠3.2.0 当我尝试替换此触发器时:
CREATE OR REPLACE TRIGGER crw_ins_trig
BEFORE INSERT OR UPDATE ON crew
FOR EACH ROW
DECLARE
BEGIN
if (:new.crw_id is null) then
select crw_id_seq.nextval
into :new.crw_id
from dual;
end if;
END;
/
我收到消息“请输入参数值。‘:new’的值”
当我单击“确定”时,结果消息是:
Warning: Warning: execution completed with warning
SQLState: null
ErrorCode: 17110
Position: 27
Query 1 of 1, Rows read: 0, Elapsed time (seconds) - Total: 0.023, SQL query: 0.023, Building output: 0
在我的应用程序中,我收到错误 “ORA-04098:触发器“CRW_INS_TRIG”无效且重新验证失败”
这与 Squirrel 有关吗?如果是这样,我该如何解决这个问题?
I use squirrel 3.2.0
When I try to replace this trigger:
CREATE OR REPLACE TRIGGER crw_ins_trig
BEFORE INSERT OR UPDATE ON crew
FOR EACH ROW
DECLARE
BEGIN
if (:new.crw_id is null) then
select crw_id_seq.nextval
into :new.crw_id
from dual;
end if;
END;
/
I get the message "Please input the parameter values. Value for ':new'"
When I click OK the result message is:
Warning: Warning: execution completed with warning
SQLState: null
ErrorCode: 17110
Position: 27
Query 1 of 1, Rows read: 0, Elapsed time (seconds) - Total: 0.023, SQL query: 0.023, Building output: 0
In my application I get an error "ORA-04098: trigger 'CRW_INS_TRIG' is invalid and failed re-validation"
Does this has to do with Squirrel? If so, how can I solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该在 SQuirrel 中卸载“sqlparam”插件,之后它不会要求您填写“:paramName”变量的值
You should unload "sqlparam" plugin in SQuirrel, after that it won't ask you to fill values for ":paramName" variables
您可能想在触发器中添加一个 REFERENCING 行,使其看起来像
Try that。如果它不起作用,请尝试使用不同的工具(例如 SQL*Plus、PL/SQL Developer、Toad 等)执行该语句。
分享并享受。
You might want to add a REFERENCING line to your trigger so that it would look like
Try that. If it doesn't work, try executing the statement using a different tool (e.g. SQL*Plus, PL/SQL Developer, Toad, etc).
Share and enjoy.