in reply to Lotus Notes date ranges not returning all documents

I tried accessing Lotus Notes by Win32::OLE but gave up on it, mainly because of the lack of documentation. Now I access the Lotus Notes e-mail database through the ODBC connector and then I can use DBI and query my e-mails with standard SQL. No need to learn all the methods of the API of Lotus Notes.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Lotus Notes date ranges not returning all documents

Replies are listed 'Best First'.
Re^2: Lotus Notes date ranges not returning all documents
by runrig (Abbot) on Feb 24, 2009 at 00:34 UTC
    Documentation was a problem for me too until I found it on the IBM site, e.g., the LotusScript COM/OLE Classes PDFs here and here (I just googled. The properties and classes in VB map easily to Perl with properties being hashrefs (->{Property}) and the methods being called just like perl methods. I haven't tried the Lotus ODBC driver and I'm not even sure if I have it or if it's even available and I just have to install it or what...I'll have to investigate and report back.
      Thanks for the links.

      Having looked at them I now remember why I gave up on OLE: reading a few thousand pages of docs for a small script was not really worth the effort then.

      If you are interested to have a look at the ODBC connector, called "NotesSQL": you can find it here.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        Thanks, found it, installed it. Works great. Seems faster than the OLE interface also. Whoever designed the database left many of the columns in the views with their default names, so I end up with queries like this:
        select * from "By Start Date" where _42 between '2009-04-01' and '2009-04-17'
        But hey, it works :-)
        Ahh, I do have an issue with the NotesSQL. The requirement that started this was to find all documents after a certain date that had a certain field empty. The field was a rich text field, and NoteSQL only returns the text part of the field, but rich text fields can contain attachments/embedded objects. So, although NoteSQL looks like it'll be useful in the future, for now, it's back to OLE for me (and I just have to scan through all documents instead of trying to use GetAllEntriesByKey() with the "by date" view) :-(