Home > Ask the Domino Experts > Domino Development Questions & Answers > Error when trying to access server DSN in LotusScript
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Error when trying to access server DSN in LotusScript

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 16 December 2004
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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Domino Development
Can I create and copy Microsoft Excel spreadsheets with LotusScript?
'Illegal circular use: Audit Trail' error when opening Lotus Notes docs
How to make computed fields recalculate
Sending and logging faxes from Lotus Notes and Domino
Accessing documents in a Lotus Notes database
Adding an action to the Lotus Notes right-click menu
Writing temporary text files that email as attachments
Trapping the on-click event of a radio button
Copying a form object using LotusScript
Connecting to a remote DB2 server with LEI

LotusScript
LotusScript agent parses ACL to Microsoft Notepad
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
Run or restart Notes/Domino agents via text messages
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts