views:

260

answers:

2

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 yelp on this would appreciated :)

+2  A: 

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 :)

Ken Pespisa
Thanks for the tip :), will running the notesw32.reg fix this error ? For some reason, the automation has suddenly stopped working in some user's machine. It was working fine till last year.
vikramjb
It is possible some updates to their machines broke the OLE compatibility. Do you know what updates/changes have been done recently to their machines? It's just a hunch, mind you. But I have some legacy apps that broke slightly after upgrading to XP Service Pack 3. Hmm...then again, is XP considered legacy too at this point? ;)
Ken Pespisa
the rate at which ms is releasing OS upgrades it sure can be considered legacy. Coming to the question, user says no upgrades have happened but on the same note most of the fix packs are automatically updated on the user's machine so the user might not have much idea which fixpack might be the cause.
vikramjb
A: 

Not much to go on, but I'd throw ProcMon at it and see what registry keys and files are being hit when you request this object.

AngryHacker
I am gonna try notesw32.reg and see if it works and if not I am gonna try ProcMon to figure out the issue. Hopefully the reg file should fix the issue.
vikramjb