简体   繁体   English

在Oracle Forms 6i中按删除按钮时,显示一个奇怪的错误

[英]On pressing delete button in Oracle forms 6i by pressing a button it's showing a strange error

Button has delete_record and commit_form . 按钮具有delete_recordcommit_form

In diagnose error it showing 在诊断错误中显示

Error in query:INSERT INTO user_details(EMPID USERNAME) VALUES (:1,:2). 查询错误:INSERT INTO user_details(EMPID USERNAME)VALUES(:1,:2)。

Error: ORA-01400: cannot insert NULL into Author Id CAPPS" "USER_DETAILS" "PASSWORD"). 错误:ORA-01400:无法将NULL插入作者ID CAPPS“” USER_DETAILS“” PASSWORD“)。

How this insert query is firing by pressing delete button. 通过按Delete按钮触发此插入查询的方式。 And record is removing from the forms but it's not updated in table. 记录正在从表单中删除,但未在表中更新。 I think when it comes to commit_form it's showing this error. 我认为当涉及到commit_form时,它会显示此错误。

DELETE_RECORD built-in does what its name suggests - deletes a record from a block. 内置的DELETE_RECORD执行其名称所建议的操作-从块中删除记录。 Subsequent COMMIT_FORM commits all changes you've made in that form, not only the last action (ie deleted record). 随后的COMMIT_FORM提交您在该表格中所做的所有更改,而不仅仅是最后一个动作(即,删除的记录)。

It appears that there's a new (or updated) record which doesn't have the PASSWORD value entered, so COMMIT - while trying to save changes - fails with ORA-01400 and notifies you that you have to enter a missing value. 似乎有一个新的(或更新的)记录没有输入PASSWORD值,因此COMMIT尝试保存更改时-ORA-01400失败,并通知您必须输入缺少的值。

Make sure that there are no such rows before committing. 在提交之前,请确保没有这样的行。 One option is to remove the user-defined button and 一种选择是删除用户定义的按钮,然后

  • delete record using the appropriate toolbar button 使用适当的工具栏按钮删除记录
  • repeat the action (ie deleting) if there are more rows that shouldn't be there 如果有更多行不应该重复,则重复该操作(即删除)
  • COMMIT using the toolbar button 使用工具栏按钮提交

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM