How do i find the database modification?

makks used Ask the Experts™
I need to read the documents whenever the database has modified(documents added,deleted or field value changed).
The program is running as desktop application. I am using "C notes api".

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Stan ReeserTechnology Strategist

It depends on how you want to be told...the basic way is to use the unread marks that is inherent in Notes.

Alternately, you could collect all new and modified documents using lotusscript's database property unprocesseddocuments and send your self a newsletter with links to each document.  If that sounds like it is what you are looking for I will post the script, or if you want to use the unread marks and need help let me know.
I think the latter solution will work better - unread marks are a pain to deal with and are part of front end only classes.
Technology Strategist
Set this agent to run on "All new and modified documents since last run"

     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim collection As NotesDocumentCollection
     Dim newsletter As NotesNewsletter
     Dim doc As NotesDocument
     Set db = session.CurrentDatabase
     Set collection = db.UnprocessedDocuments
     Set newsletter = New NotesNewsletter( collection )
     Set doc = newsletter.FormatMsgWithDoclinks( db )
     doc.Form = "Memo"
     doc.Subject = "Updated or New Docs"
     Call doc.Send( False, "Your UserName Here" )
     Call collection.UpdateAll

If you need other refereneces just check the help on the NotesNewsletter class.


Thanks for reply!!!. I am using "C API". No direct API call for corresponding notes com class function.  Anyway i got an idea from your code.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial