Solved

How can I get access to my Lotus Notes database with Delphi 2010

Posted on 2011-09-27
17
1,703 Views
Last Modified: 2013-11-23
I'm trying to get access to my Lotus Notes Database with Delphi 2010. But I don't know how to do this.

Can anyone help me with some code?
0
Comment
Question by:QC20N
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 5
17 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 36709745
0
 
LVL 25

Expert Comment

by:epasquier
ID: 36714159
I remember using Notes/Delphi Class Library (probably the one by Sergey Kolchin), it was with Notes 4.5 or 4.6, 12 years ago, that was my first training summer job before I graduated....
That worked well. But that was for Delphi 5, and older Notes API.

I don't think it would be a good idea to use that anymore. Instead, I strongly recommend the COM API, as it should remain very close to LotusScript code. At least that's what I remember when once I used it with VBA.
But again, that was 4 versions of the product ago, a full decade..
0
 

Author Comment

by:QC20N
ID: 36714919
Yes, I have looked at it, but with no luck.

My version of Lotus Notes i 8.

Do you have some code from that time anyway, so I can have an idea on how to proceed anyway.

Thank you.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Expert Comment

by:epasquier
ID: 36715146
no luck for that, all my code from that era was lost in THE terrible hard drive crash I experienced in 1998 (advice of the day : don't ever accidentally hit the power button while converting your partition from FAT16 to FAT32 )

Still, as I said, your best shot is COM interface. Try importing Lotus Notes COM type library, Delphi will create wrapper classes that you can use like native components: Menu Component -> Import Component
Then find something related to Lotus Notes / Domino in the list, and follow import procedure
this is how to do it in Python, but importing a type library is a common thing for many dev platforms :
http://invisibleroads.com/tutorials/notes-mail-read-win32com.html
This tell us that you probably have 2 type lib to import :
"Lotus Domino Objects" & "Lotus Notes Automation Classes"

you can probably get a lot of useful information here
ftp://ftp.lotus.com/pub/lotusweb/devtools/comdoc.chm 

and here an example of how to use it :
http://www.delphi3000.com/articles/article_3197.asp?SK=
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 36715533
Ah, now wouldn't that be the example I posted earlier? ;-)

@EP: où est le site TMT?
0
 
LVL 25

Expert Comment

by:epasquier
ID: 36715624
wouldn't that be the example I posted earlier?
Sorry about that. Since you didn't commented your findings, I forgot you already gave that sample. Next time, saying in your post what is this link about and your comments about it can help, and that adds a bit of value to Google ;o)

TMT is gone, I have a new company since last year, that is mine only this time. Where did I left some reference of TMT web site ? My new one (if you can call it that, haven't found time to finish it , so it's just a mockup really) : http://psoftprod.free.fr/
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 36715771
Yes I know, I should have added some comments indeed, but since Delphi isn't my turf, at all. I didn't know what to write apart from posting some pages that seemed related to the question. If Delphi can do COM that's the way to go. Many external applications use the Notes COM interface. The drawback is that it requires a local Notes installation. Java/CORBA (DIIOP) can communicate directly with the server.

See your EE profile about TMT.
0
 
LVL 25

Expert Comment

by:epasquier
ID: 36715856
If I remember correctly the typical environments where Lotus Notes is used generally (big companies), having Notes setup locally isn't much of a problem : it's installed everywhere, whatever your OS. Since the last time I looked, they probably also invaded your mobile, maybe there is even an application for that in AppleStore :o)

But for performance issues, accessing directly the server might be usefull, instead of having a big fat COM library between. Well, it depends on Java implementation if there is something to gain from that, but one could then use JNI (Java Native Interface) to embed JVM in Delphi application to run Java-based solution to connect to Notes Server.
While that could be an effective solution, do that only if you have time to loose on experimentation and simply love funny software breeding
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 36715911
:-)

More and more companies try to move away from the fat Notes client, towards a browser-based interface built in XPages. I still prefer Notes, for its features and security, but the buzz word is Web2 apparently. In such an environment, where Notes isn't installed, you have to look beyond the standard COM interface. So, maybe even a browser-based connection could work. You can also build web services in a Domino server, that might be another option. Does Delphi support web services?
0
 
LVL 25

Expert Comment

by:epasquier
ID: 36716016
sure it does
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 36716994
't was a stupid question... ;-)
0
 

Author Comment

by:QC20N
ID: 36719040
I found some code that access my database, but I have no clue how I should get info from my calendar.

I have attach the files. Maybe you can help me?

 uFormMain.pas Domino-TLB.pas
0
 
LVL 25

Expert Comment

by:epasquier
ID: 36720059
do not use an imported interface that has been generated in 2001 with 1st version of API
// File generated on 6/5/01 11:19:11 AM from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\Lotus\Notes\domobj.tlb
// IID\LCID: {29131520-2EED-1069-BF5D-00DD011186B7}\0
// Helpfile:
// HelpString: Lotus Domino Objects
// Version:    1.0
// ************************************************************************ //
instead, import it yourself , and generate the interface that will match exactly the object installed on your environment. That is an easy thing to do, beleive me. Follow my instructions I gave you and tell us if you have problems.

When that is done, I believe that the Delphi part of your problem is gone, and you'll only have to ask Notes expert about how to do this or that specifically. It will be the same thing to do with Delphi than with LotusScript, as both use the COM object API
0
 

Author Comment

by:QC20N
ID: 36817625
I have imported the library class, but I can't see how I can proceed with my goal.

 Domino-TLB.pas Domino-TLB.pas
0
 

Author Comment

by:QC20N
ID: 36891434
Anyone?
0
 
LVL 25

Accepted Solution

by:
epasquier earned 500 total points
ID: 36891549
well, I think you have it all now.
Your last Domino-TLB looks up-to-date, you are ready to do whatever you want with Notes from your Delphi application.
I believe that old uFormMain.pas example will work fine with it.
It tells you how to initialize a session object, from which all others derive. What you want to achieve after that is up to you, and how to do it, only a Notes programming (LotusScript) expert can tell. Myself, I haven't written one lotus notes script since 2000, and my Notes installation is long gone, so I can't even just check that I can open a simple DB.
I'm sure you can be started with all that, and post other Notes specific question in a Zone that is not Delphi (but LotusScript)
0
 

Author Closing Comment

by:QC20N
ID: 36891694
Ahh, yes. That mightbe a good way to proceed. Thank you.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reconfigure Delphi Install? 2 78
Dev express lookupcombo 3 64
eclipse apache tomcat admin console 52 193
DBCtrlGrid, Delphi, Scroll 7 35
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

751 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