Connecting to Domino

I have a client that uses Domino/Notes for scheduling work in their shop. They want to me to call a Notes process and pass some data whenever my system is updated. The source of the data is a SQL database. My plan was to use a VB script or a .Net program to look for new data in the SQL table and then pass it to Notes.

I've tried to login using a VBScript to Domino and I can only do it when I have a Domino client running. I cannot pass the user ID and password for some reason.

Here's what I have:

 
Dim session 
Set session = CreateObject("Lotus.NotesSession") 
Call session.Initialize("password")

Open in new window


I get an error telling me the server cannot be opened.
jczanderAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
Ask them if you can send the application a mail, with the data to be passed (in XML format for example). Much cleaner, no sessions, no password hassle, no direct connections...
0
 
mbonaciCommented:
Which version of Domino?
If it's 7 or above, I suggest you create a web service, provided by Domino server and simply call it from SQL SP.

What is the exact error message?
0
 
mbonaciCommented:
Here's Designer help link about Initializing a Notes Session:

http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_ACCESSING_THE_DOMINO_OBJECTS_THROUGH_COM_INITIALIZING.html

Be sure to follow the link "Accessing the Domino Objects through COM", located at the bottom of the page.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Bill-HansonCommented:
There is nothing wrong with your code above.  My guess is that you installed the Notes Client, but never ran it.  You have to run the client once to complete setup.  Then try your code again.

Also, I have not been able to get the COM library to work under 64 bit using VB Script.  It works for VBA, ,C# and VB.Net under 64 bit, and it works for VB Script under 32 bit, but not VB Script under 64 bit.  Not sure why.  I use C# for most Domino integration projects.
0
 
jczanderAuthor Commented:
They are on version 8.x

I have run the client many times.

Domino is running on a 64 bit box, but the client is 32 bit.

The weird thing is it runs from a command line if I have a client open and the user ID on the script matches the user ID of the client.
0
 
Bill-HansonCommented:
For NotesSession.Initialize, the client must be installed and only the current user has access.  If the client is not running, it will launch automatically.  If you pass an empty string to NotesSession.Initialize, the user will be prompted to authenticate automatically.

If you are running the script on the same machine as the Domino server, then you can use the NotesSession.InitializeUsingNotesUserName method which allows you to authenticate as any trusted user.

Personally, I would setup a Domino web service as mbonaci suggested, and consume it in a .Net app.  Much more elegant than COM.
0
 
Sjef BosmanGroupware ConsultantCommented:
@Bill: and how about my mail idea?
0
 
Bill-HansonCommented:
It would depend on the application and how 'real-time' the data access needs to be.  I tend to use email as a last resort when designing a new integration points, but it certainly works.
0
 
Sjef BosmanGroupware ConsultantCommented:
In disparate systems like the ones mentioned above, mail would my preferred data communication vehicle... Technically speaking, only to be abandoned when the data is to be made available on the other side 'real-time'.

@jczander: can you give us some figures about the application, i.e. how often has data to be exchanged, and how much?
0
 
mbonaciCommented:
Generally speaking (not-only-domino-related), web services are introduced exactly for communication between loosely coupled systems.
Add ESB (see EDA architecture) and they are not coupled at all, and IMHO, that should be the ultimate (one step beyond SOA) goal for every enterprise architecture.

I mean, you cannot even begin to compare mail with that.
0
 
Sjef BosmanGroupware ConsultantCommented:
Touché...
0
 
jczanderAuthor Commented:
Thanks all for the help. I eventually settled on the mail approach. I'm writing out a VBScript that sends an e-mail with the data in the body. It is less that ideal, but it works as close to real time as I can get.

As a relational database and .Net guy, I'm not a big fan of Notes.

Thanks again.
0
 
jczanderAuthor Commented:
general answer, but led me in the right direction.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.