Solved

Connecting to Domino

Posted on 2010-11-17
13
505 Views
Last Modified: 2013-11-16
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.
0
Comment
Question by:jczander
  • 4
  • 3
  • 3
  • +1
13 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 34162213
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
 
LVL 22

Expert Comment

by:mbonaci
ID: 34162220
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
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 500 total points
ID: 34162653
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
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 34163873
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
 

Author Comment

by:jczander
ID: 34176019
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
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 34176398
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34179639
@Bill: and how about my mail idea?
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 34187779
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34193084
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
 
LVL 22

Expert Comment

by:mbonaci
ID: 34194637
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34194789
Touché...
0
 

Author Comment

by:jczander
ID: 34252800
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
 

Author Closing Comment

by:jczander
ID: 34252817
general answer, but led me in the right direction.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now