Link to home
Start Free TrialLog in
Avatar of QC20N
QC20NFlag for Denmark

asked on

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

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?
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

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..
Avatar of QC20N

ASKER

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.
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=
Ah, now wouldn't that be the example I posted earlier? ;-)

@EP: où est le site TMT?
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/
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.
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
:-)

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?
sure it does
't was a stupid question... ;-)
Avatar of QC20N

ASKER

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
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
Avatar of QC20N

ASKER

I have imported the library class, but I can't see how I can proceed with my goal.

 Domino-TLB.pas Domino-TLB.pas
Avatar of QC20N

ASKER

Anyone?
ASKER CERTIFIED SOLUTION
Avatar of Emmanuel PASQUIER
Emmanuel PASQUIER
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of QC20N

ASKER

Ahh, yes. That mightbe a good way to proceed. Thank you.