Ruby + Lotus Domino oh my!

K

Kev Jackson

Hi,

Does anyone have any experience interfacing ruby to Notes/Domino? I
only need to do a data extract, and I absolutely do not want to have to
code up C/Java just to suck the data out of a Notes database.

I could (in theory) hack up a Notes agent to export the database it was
in, but I doubt I'll be allowed to mess with it in that much detail,
simple ODBC hookup will be about as good as it gets I think

Kev
 
W

Wilson Bilkovich

If you can run Ruby on the same box as Domino, you can do this. This
particular kind of access doesn't work across systems. (Untested
code, use as directed, etc, etc.)
require 'win32ole'
SERVER_NAME =3D 'example/M/ORG'
USER_NAME =3D 'godmode'
NOTES_PASSWORD =3D 'supersecret'
DB_NAME =3D 'example.nsf'

s =3D WIN32OLE.new 'Lotus.NotesSession'
s.InitializeUsingNotesUserName(USER_NAME, NOTES_PASSWORD)
db =3D s.GetDatabase(SERVER_NAME, DB_NAME)
view =3D db.GetView "All Documents"
entry =3D view.GetFirstDocument # I hate the Notes COM interface.
while entry
doc =3D entry.Document
puts doc.GetFirstItem("Subject").Values
puts doc.GetFirstItem("Categories").Values
entry =3D view.GetNextDocument(entry) # Yes, this is weird.
end

Once you've gotten that working, you can read up on the various evil
COM methods here:
http://rubyurl.com/Rry

Personally, I find them easier to view them inside Visual Studio's
"object browser".

--Wilson.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top