Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1802
  • Last Modified:

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?
0
QC20N
Asked:
QC20N
  • 7
  • 5
  • 5
1 Solution
 
epasquierCommented:
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
 
QC20NAuthor Commented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
epasquierCommented:
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
 
Sjef BosmanGroupware ConsultantCommented:
Ah, now wouldn't that be the example I posted earlier? ;-)

@EP: où est le site TMT?
0
 
epasquierCommented:
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
 
Sjef BosmanGroupware ConsultantCommented:
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
 
epasquierCommented:
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
 
Sjef BosmanGroupware ConsultantCommented:
:-)

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
 
epasquierCommented:
sure it does
0
 
Sjef BosmanGroupware ConsultantCommented:
't was a stupid question... ;-)
0
 
QC20NAuthor Commented:
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
 
epasquierCommented:
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
 
QC20NAuthor Commented:
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
 
QC20NAuthor Commented:
Anyone?
0
 
epasquierCommented:
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
 
QC20NAuthor Commented:
Ahh, yes. That mightbe a good way to proceed. Thank you.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 7
  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now