如何从 SQL 数据库更新字段

发布于 2024-12-08 18:28:00 字数 350 浏览 1 评论 0原文

我有一个 Lotus Notes 应用程序,其中包含一个带有 Numberdescription 字段的文档。

用户保留创建文档时的一系列号码。然后他们填写描述和其他一些内容。

完成此操作后,他们将进入另一个应用程序(Qpulse;不是 Notes 应用程序),该应用程序将其数据存储在 SQL 数据库中。 他们将在该系统中创建具有匹配编号的文档。

在该系统(Qpulse)中创建文档后,我想更新注释中的描述字段。

我过去的做法是运行一个 Notes 代理来执行查询,循环查找结果并更新 Notes 文档。

有更好的方法吗?如果能自动更新就太好了。

I have a lotus notes application that has a document with a Number, and a description field.

Users reserve a series of numbers at which point documents are created. They then fill in the description and a few other things.

Once this is done they go into another, application (Qpulse; not a notes application) that stores its data in an SQL database.
They will create documents in that system with matching numbers.

Once the documents are created in that system (Qpulse) i'd like update the description field in notes.

How i've done it in the past is to have a notes agent running that does a query, looping through the results finding and updating notes documents.

Is there a better way of doing this? It would be nice to have it automatically updating.

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

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

发布评论

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

评论(2

节枝 2024-12-15 18:28:00

恕我直言,使用像您这样的代理是最简单的解决方案。

不过,如果数据库在 domino 服务器上运行,我会想到另一个想法。使用 HTTP 将更新发布到数据库可能相当简单。您仍然需要在 Notes(接收 POST 的代理)中编写一些代码,但在更新 Qpulse 应用程序后进行 HTTP 调用可能会更简单。

您将发送一些唯一标识符(我想是数字字段?)和 POST 中的描述,代理将通过 DocumentContext 对象接收它,并且可以查找和更新文档。该过程将由 Qpulse 端的某些触发器启动。

这并不简单,但它确实避免了在 Notes 之外编写大量代码,并避免尝试将 Notes 作为外部数据源连接。

Using an agent like you have already is IMHO the simplest solution.

Another thought comes to mind, though, if you have the database running on a domino server. It could be fairly simple to POST the update to the database using HTTP. You'd still have to write some code within Notes (an agent to receive the POST), but it might be simpler to make an HTTP call after the Qpulse application is updated.

You would send over some unique identifier (that Number field I suppose?) and the description in the POST, the agent would receive it via the DocumentContext object, and could find and update the document. This process would be initiated by some trigger on the Qpulse side.

This isn't simple, but it does avoid writing lots of code outside of Notes, and avoids trying to connect to Notes as a datasource externally.

谜兔 2024-12-15 18:28:00

尝试与关系数据库系统集成是一个相对常见的问题。但有意义且直接的例子似乎难以捉摸。我建议尝试 JDBC。那里有一些教程。也许这个 将帮助您入门。

您可以尝试 Lotus 连接器 LotusScript 扩展类。 Domino Designer 客户端中有 API 帮助文档。我还发现这个 IBM Lotus Connectivity Redbook 很有用,尽管它是 10岁了。

Trying to integrate with relational database systems is a relatively common problem. But a meaningful and straight forward example seems elusive. I would recommend trying JDBC. There are a few tutorials out there. Perhaps this or this will help get you started.

You could try the Lotus Connectors LotusScript Extension Classes. There is API help documentation in you Domino Designer client. I have also found this IBM Lotus Connectivity Redbook useful, despite it being 10 years old.

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