George Duckett
George Duckett

Reputation: 32438

How to update field from SQL database

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.

Upvotes: 1

Views: 469

Answers (2)

Ken Pespisa
Ken Pespisa

Reputation: 22264

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.

Upvotes: 1

angryITguy
angryITguy

Reputation: 9561

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.

Upvotes: 1

Related Questions