Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Lotus Notes Database

Status
Not open for further replies.

larrystrick

IS-IT--Management
Feb 12, 2003
9
US
Is there any way I can read from a Lotus Notes database
with a PERL script?
 
Sure is. Here is what I used:

use Win32::OLE;
my $Notes = Win32::OLE->new('Notes.NotesSession') or die "Cannot start Lotus Notes Session object.\n";

This sets up your handle. Next, you specify the database that you want to open, as well as where it might be (the server name). If this example, my server is referenced by $server, and the database name is referenced by $dbname:

$Database = $Notes->GetDatabase($server, $dbname);

So for example, $server = "SERVER1/ATLANTA/XYZ", and $dbname = "admin4.nsf".

Finally, I get the view within the database that I am looking for. In my example below, I want a particular view from the admin4.nsf database called "All Requests by Action":

$GetView = $Database->GetView('All Requests by Action');
$Entries = $GetView->AllEntries;
$rc = $Entries->Count;

This should get you started. A good reference that I have found on the web is:
Good luck!

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top