powerbuilder:pfc_save问题

发布于 2024-09-06 19:41:56 字数 282 浏览 1 评论 0原文

我有一个正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮世清欢 2024-09-13 19:41:56

如果您的数据窗口继承自 pfc_u_dw,您将在那里(在祖先的 pfc_validation 事件中)看到:

-1 = validation failed

确保返回在祖先中定义为失败值的值

If your datawindow inherits from pfc_u_dw, you will see there (in the ancestor's pfc_validation event) that:

-1 = validation failed

Make sure that you return the value that is defined as the failure value in the ancestor

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文