在 Powerbuilder 数据窗口和 SQLServer 插入/更新存储过程之间传递时间戳

发布于 2024-09-27 04:22:26 字数 184 浏览 2 评论 0原文

谁能帮我。

通过实施解决并发问题的对策,我遇到了使用插入和更新存储过程在 Powerbuilder 7 datawindow 和 SQLServer 2008(两种方式)之间传递时间戳(行版本)的问题。

该连接由 ODBC 提供服务,而不是本机连接。我的大多数尝试都会导致铸造问题(转换)。该怎么办?

总氮

can anyone help me out.

By implementing countermeasures in solving the concurrency problem I got troubled with passing timestamps (rowversion) between Powerbuilder 7 datawindow and SQLServer 2008 (both ways) using insert and update stored procedures.

The connection is serviced by ODBC, not native. Most of my attempts result in casting poblems (convert). What to do?

Tnx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

死开点丶别碍眼 2024-10-04 04:22:26

不使用时间戳,而只使用整数。然后,更新存储过程将接受它作为其参数之一,并将其​​与数据库中的参数进行比较。如果它们不匹配,您可以报告“此记录已被其他用户更新,您需要检索它才能进行进一步更改”,如果它们匹配,则更新过程只会增加版本作为一部分的记录更新。

Instead of using a timestamp, just use an integer. The update stored procedure will then accept this as one of it's parameters and compare it against the one in the database. If they don't match, you can report back that "this record has been updated by another user, you will need to retrieve it before you can make further changes", if they do match, the update procedure just increments the version as part of the record update.

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