Agent will not execute CreateObject method when security runtime set to 2

Need some help with this one, very strange situation.

I have an agent which executes some code in which it invokes CreateObject. It will run from manual execution, but a scheduled agent will error out every time.

The error:

Operation is disallowed in this session

Module: CLSADO Function: NEW Line: 30

The code:

          ...

30 Set m_con = CreateObject( “ADODB.Connection” )

31 Set m_rs = CreateObject( “ADODB.Recordset” )

32 Set m_cmd = CreateObject( “ADODB.Command” )

          ...

I have seen the other posts on here with that the problem lies in the security access of the agent executing the code. I made sure it was set to 2. Allow Restricted Operations. I tried security level 3 as well, but it wouldn’t run ( I am sure our Notes admins have something that prevents this.)

I feel like I am going crazy here, because the admins aren’t aware of any setting they are using that is preventing this from running.

Has anyone else run into a similar problem, or have any idea what my particular problem may be? I am sure it isnt the code, because I replaced ADO objects with other more Lotus friendly items (like Notes.Session) and the error remains the same.

—Josh S.

Subject: Agent will not execute CreateObject method when security runtime set to 2

I would try to sign the agent with Admin ID or Server ID and see if it helps.

Subject: RE: Agent will not execute CreateObject method when security runtime set to 2

That was it!!! My Notes admins probably should have picked up on that, but thanks for your help