Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status Needs Review
Workspace Domino Designer
Categories LotusScript
Created by Guest
Created on May 13, 2022

LotusScript class NotesDominoQuery

Running a DQL query against a server based Database.

Database contains ~500k documents and is full text indexed.

Code is run as a server agent (On schedule = never, Target = None; then run from console as

tell amgr run "<mydatabase.nsf>" '<myAgentName>'

The agent code is:

Sub Initialize

Dim sn As New NotesSession

Dim dbThis As NotesDatabase

Dim nQuery As NotesDominoQuery

Dim dcl1 As NotesDocumentCollection

Dim sQuery1 As String

Set dbThis = sn.Currentdatabase

Set nQuery = dbThis.Createdominoquery()

Call nQuery.Setnamedvariable("sCategory", "DEV")

sQuery1 = "tskNumber >= 10000 AND tskNumber < 20000 AND tskCategory in (?sCategory)"

Print "sending query " & sQuery1

Set dcl1 = nQuery.execute(sQuery1, "docset3", True, 2)

Print "number of docs in dcl1 = " & CStr(dcl1.count)

End Sub

At the server console I see that the agent is started and the line "sending query..." is printed. After that an error message appears at the console:

>> Agent Manager: Agent '<agentName>' error: Domino Query execution error:

Running the same agent with the nQuery execution simplified as

Set dcl1 = nQuery.execute(sQuery1)

The code runs fine, no error occurs, and the result is as expected

the operation that is failing is storing the result set due to the use of substitution (named) variables in the query.

We want to refresh the foundsets in future releases but we can't guess what the substitution value would be

  • Attach files