Notes Access to MS SQL Server via Web (ADODB)

I am trying to update a backend MS SQL Server via the “WebQuerySave” event of the ‘form’ using the following agent. I am getting the following error on the console:

“Operation is disallowed in this session”

It is breaking at

‘Set cn=createobject(“ADODB.Connection”)’

The code is working fine if I try to run it via notes client. But it is failing via browser. What additional settings do I need for the ADODB to work via web.


Sub Initialize

Dim session As NotesSession

Dim doc As NotesDocument

Set session = New NotesSession

Set doc = session.DocumentContext

Dim Connect As Variant

Dim RecordSet As Variant

Dim Qry As String

Dim cn As Variant



Print "test 1"

Set cn=createobject("ADODB.Connection")

Print "test 1"



cn.Open "DRIVER={SQL Server};SERVER=DEV;database=Prod;UID=dev;PWD=password"

Qry = |Select * from web_stat|

Set RecordSet = CreateObject("ADODB.Recordset")

RecordSet.Open Qry,cn,2,1

RecordSet.MoveFirst

For i = 1 To 10

	Print Cstr(i) & " --> " & RecordSet.Fields("file_accessed").Value

	RecordSet.MoveNext

Next

RecordSet.close



strSQL = "exec file_tacker"



cn.Execute (strSQL)

cn.close

End Sub


Subject: Read up on Agent Security. The signer of the Agent needs to be in the…

Programmability Restrictions

Who can -

Run unrestricted methods and operations:

Also, the Agent’s own security must be set to 2. Allow restricted operations (on the 2nd tab of the agent properties)