Access Lotus Notes

Started by hienpham, July 28, 2014, 05:32:47 PM

Previous topic - Next topic

hienpham

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

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

Thanks TD, with your help, I got all the information that I need.
Thanks again.
hien