powerbuilder:pfc_save问题
我有一个正在使用 pfc 服务的用户对象。现在,在更新过程中,我已在 pfc_validation()
函数中编写了验证代码,当验证不成功时,我将从该函数返回 -3
。但我仍然收到一条错误消息:“发生数据库错误......”,这意味着更新过程没有中止。我想如果我从 pfc_validation
函数返回 -3
,它将停止进一步的更新过程。
现在,如果验证失败,如何取消 pfc_save
过程的其余部分?
I have a user object which is using pfc services. Now, during update, I have written my validation code in the pfc_validation()
function, and when validation does not succeed, I am returning -3
from that function. But still I am getting an error message saying - "A database error has occured.....", which means the update process is not aborting. I thought if I return -3
from the pfc_validation
function, it will stop the further update process.
Now how can I cancel the rest of the pfc_save
process if validation fails?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的数据窗口继承自 pfc_u_dw,您将在那里(在祖先的 pfc_validation 事件中)看到:
确保返回在祖先中定义为失败值的值
If your datawindow inherits from pfc_u_dw, you will see there (in the ancestor's pfc_validation event) that:
Make sure that you return the value that is defined as the failure value in the ancestor