Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lotus Database Export
Message
 
 
To
20/11/2001 11:06:48
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00583503
Message ID:
00584444
Views:
27
Wes,
I'm not sure I know what you are doing and when you're doing it.

First of all, you can't change the UserName property to access a different user. UserName is Read-only and is associated with the ID file being used when you initialize the session.

There is a InitializeUsingNotesUserName method of the NotesSession object but that can only be used on a server. For example, if you wanted to use it in a server agent, it would work. This method accesses the Domino Directory (Address book) and uses the Internet password for authentication purposes. It doesn't look like this scenario applies here.

Two suggestions:
1. If you know your users are going to be in Notes when your stuff runs, you can use the Notes.Notessession object instead of Lotus.Notessession. If your user has already authenticated, VFP will get an object reference to the authenticated session and you can do what you need without any problems.
2. Embed a UserID file in your application. Copy it out to the hard drive for the duration of your process. Modify the Notes.Ini file to use your UserID file instead of the user's default. Use the Initialize method with your embedded UserID, run your process and then reset everything back to the way it was before you started, making sure to delete the temporary UserID. This needs to be done if Notes isn't running already.

FWIW, for more information, on-line help can be found at http://doc.notes.net/domino_notes/5.0.3/help5_designer.nsf.

HTH.

>Larry,
>Using the com approach to insert records into my Fox table from lotus database would be the preferred approach. This is the method I intended on doing. As my research took me deeper I could not find any syntactical solution using LotusScript Back-End Classes. That is what resorted me to exporting the notes database file.
>I need to sync the address book with my Foxtable every two weeks.
>The error handling needs to be used because the email account being used to send the messages will never be seen by a user. If an email account is invalid then the memo needs to be printed to the screen for the user to hand deliver and a report generated of all of the invalid addresses so that they can be fixed.
>As I get furthur into this method I find that I run into the problem of creating the instance of the NotesSession Object. I can easily '.initialize' the password of the default session on A particular user's computer, but I run into the problem of making the app portable on other computers. When the Session is created it automatically uses the current '.userid' to begin the session. When I try to reset the .userid to the 'system email account's userid' I get an error message, see code:
> loNotes = CreateObject("Lotus.NotesSession") && create notes session
> loNotes.username("CN=Wes Holden/OU=D20/0=DCA")&& initialize session with user id
> loNotes.initialize("password")&& initialize session with password)
>
>Any syntax examples would be great. I have scoured Advisor.com, LotusNotes 4.6 and Domino Server by SAMS, all over the net and several other user groups with no luck with solutions.
>
>
>
>Thanks a million Larry.
>
>>> Wes
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform