Scheduled Agents and OLE

Tags:
Lotus Domino
Currently, I have a client who maintains a excel spreadsheet located on a network drive. This spreadsheet contains a number of graphs. The client copied these graphs into a Lotus Notes Document and pasted them using a OLE so that everytime someone opens the document it prompt the person to update the data. If the person says yes, it goes and gets the latest data. The issue is this database is also BROWSED (not editted) via web browsers and the client want those looking at the information could be seeing out of date data. What they would like to happen is have a schedule agent run once an hour update the graphs (if they've changed) and save and close the document. This would also allow the people even using Lotus Notes say NO as it can take a few minutes to update all the graphs. Is this possible? I've setup an agent that maps the network drive on the server and is signed by an unrestrited ID. The agent works fine when I run it. However, when run in the background the log just gives the following "error" which doesn't help a lot: AMgr: Agent ('Update v2' in 'test.nsf') error message: Error creating product object The code looks like this (this is just to test the idea): Sub OLERefresh Dim s As New NotesSession Dim db As NotesDatabase Dim dc As NotesDocumentCollection Dim doc As NotesDocument Dim uidoc As NotesUIDocument Dim sstring As String Print " v2 this is a test message " Set db = s.CurrentDatabase sstring = |MarkFlag="SMC"| Set dc = db.Search(sstring,Nothing,0) If dc.count = 1 Then Print "v2: Before Mapping" drive = "S" serverName = "servernameshared" userName = "domainmynetworkID" userPwd = "password" Print "net use "+drive+": "+serverName+" /user:"+userName + " "+userPwd returnvalue = Shell( "net use "+drive+": "+serverName+" /user:"+userName + " "+userPwd ) Print "v2: Drive mapped" Set doc = dc.GetFirstDocument Set uidoc = ws.editdocument(True,doc) Call uidoc.Refresh Call uidoc.Save Call uidoc.Close Print "v2: Drop Drive" returnvalue = Shell( "net use "+drive+": /delete" ) End If Print "v2: Done" End Sub
ASKED: June 6, 2006  3:47 PM
UPDATED: June 6, 2006  4:46 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

“Error creating product object” occurs if you use a front end class in a scheduled agent. See if you can write the agent using only backend classes.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following