Solved

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

Posted on 2011-09-27
17
1,627 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 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

25 Experts available now in Live!

Get 1:1 Help Now