I have a LotusScript agent that accesses documents in other databases.I runs perfectly when executed from the menus, but fails when run on
a schedule. I have traced the problem to the following line:
db = session.GetDatabase(“ServerName”, “DBName”, False)
The db object is Null when run on a schedule. The agent signer has
Manager rights to “DBName”. Any ideas would be greatly appreciated
as what is left of my hair is looking rather ragged.
Subject: Open the agent in designer and check 2nd tab properties. Set Runtime security to 2.
Subject: Already tried that…
In fact, I’ve even set it to “3”…no luck.I’ve basically exhausted all of my ideas as to why this would fail…tried every security option I could find or dream up. Thanks for you help anyway.
Read that @Function agents needed the calling db’s UNID in the called DBs ACL, but don’t think that applies here.
Subject: Try: db = session.GetDatabase(“”, “DBName”, False) since its sched on server.
Subject: Unless its opening a db on another server. In that case try:
Server Access
Who can -
Trusted servers:
ServerWhereAgentIsCallingFrom
to the server document that the agent is trying to open.
Subject: Unsuccessful, but perhaps a clue?
When I use the empty string to specify the server the db object is Null, even when run from the menus.
In other words, unless the server is specified explicitly the agent fails regardless of how it is run.
Also, I failed to explicitly state that the database containing the agent and the database the agent is trying to get a handle on both reside on the same server.
Subject: Then try
db = session.GetDatabase(session.CurrentDatabase.Server, “DBName”, False)