viewpoint-particle

Author Topic: Access Lotus Notes  (Read 2260 times)

hienpham

  • Newbie
  • *
  • Posts: 46
Access Lotus Notes
« on: July 28, 2014, 05:32:47 pm »
Hi,
   I use WinBatch to access the Lotus Notes database as follow:

      oLN = createobject("Lotus.NotesSession")
   if oLN == 0
       Message("Warning", "Cannot Access")
       exit
    endif
        sss = oLN.Initialize          ; we have to provide the password
       ccc = oLN.CommonUserName      ;
       dir = oLN.GetDbDirectory("<servername.domain.com")      

 this section is just the start of a larger script. We will set the script as a cron job that will run everyday.
We do not have any problem accessing the database but the problem that we have is:  "    sss = oLN.Initialize   "  that prompts us for password any time we run the script.
 How can we solve that problem? Can we somehow preset the password? This WinBatch script will be compiled and the password will also be hidden.

thanks
hien

Thanks

td

  • Tech Support
  • *****
  • Posts: 3210
    • WinBatch
Re: Access Lotus Notes
« Reply #1 on: July 29, 2014, 06:40:29 am »
According to the Lotus Notes class documentations you can use the 'InitializeUsingNotesUserName' method to specify a user name and password.

http://www-12.lotus.com/ldd/doc/domino_notes/Rnext/help6_designer.nsf/f4b82fbb75e942a6852566ac0037f284/8cb15cebdc3fcfc285256c54004d46a2?OpenDocument
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

hienpham

  • Newbie
  • *
  • Posts: 46
Re: Access Lotus Notes
« Reply #2 on: July 29, 2014, 02:20:30 pm »
Thanks TD, with your help, I got all the information that I need.
Thanks again.
hien