comvb6lotus-noteslotus

Notes Sessions Vs Lotus Session COM API Issues


I maintain a fairly large application which does a lot of talking with Lotus Notes. Recently in the last couple of months, some users have been having problem connecting to the Lotus Notes Session, I use the following code to get the session

Set Session = CreateObject("Notes.NotesSession")

This error seems to be popping up only for a certain number of users. I created a sample app with the following line

Set Session = CreateObject("Lotus.NotesSession")

And the above line works for some reason. The user says there was some issue installing notes but has been rectified after a re-installation. Why are there two class names for the same object and why is one working an other one not working.

Any ideas on how to resolve these API issues?


Solution

  • This documentation on IBM's site mentions that Notes.NotesSession is OLE based,

    After installing release 5.0.2b, you will see in the operating system registry a class named Lotus.NotesSession, as shown below. This is the root of the Domino COM classes. Still present are Notes.NotesSession and Notes.NotesUIWorkspace which are the OLE roots

    I don't know specifically why the OLE classes are failing where the COM classes do not, but given that OLE is two decades old now, I would stick with Lotus.NotesSession