Problem solve Get help with specific problems with your technologies, process and projects.

Error when trying to access server DSN in LotusScript

I have a problem related to server DSN connectivity in Lotus Notes. I want to access the server DSN in LotusScript. But it shows this error:

**Notes error: Error Validating user's agent execution access.**

I am running the agent and it's called another agent odbc1. How can I call server DSN?

My code is:

Dim session As New NotesSession    
     Dim uidoc As NotesUIDocument 
        Dim ws As New NotesUIWorkspace 
        Dim notsagent As NotesAgent 
        Dim db As NotesDatabase 
        Dim doc As NotesDocument         
        Dim parm As String 
        Set db = session.CurrentDatabase 
        Set doc = New NotesDocument(db) 
        Set uidoc = ws.CurrentDocument         
Set notsagent=db.GetAgent("odbc1") 
        Call doc.save(True, False) 
        parm = doc.NoteID 
        Msgbox "Parameter of " & parm 
        Call notsagent.RunOnServer(parm) 
        Msgbox "Right" 
The message you're getting probably occurs because you're trying to execute a "restricted" operation in the agent you are calling. For this to work, the ID that signed the agent has to have access to run restricted agents (in the Security tab of the server configuration document), and also the agent has to have the "Runtime Security Level" option set to two or higher (in the Agent Properties Security tab -- one is the default).

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...