ResetNamedVariables method (NotesDominoQuery - LotusScript)

Removes all previously set named variables and values from a DominoQuery instance.

Defined in

NotesDominoQuery

Syntax

NotesDominoQuery.Resetnamedvariables( )

Parameters

None

Return value

None

Usage

Removes all previously set named variables and values from a DominoQuery instance. If SetNamedVariable returns an error indicating that there is already a bound value for a specified name, call ResetNamedVariables to clear the variable state.

Overwriting existing bound variable values is not supported; you must call ResetNamedVariables to clear the variable state prior to setting variables by the same name.

Example

Dim Query$ as String
Dim lastname$ as String
Dim NotesDatabase db
Dim TheQuery As NotesDominoQuery
Dim doccol As NotesDocumentCollection
Set db = Session.Getdatabase(my.nsf)
Set TheQuery = db.Createdominoquery()
TheQuery.Setnamedvariable(lastname, Stevens)
Set Query$ = firstname != "Annabelle" and lastname = lastname
Set doccol = TheQuery.Execute(Query$)
¦
TheQuery.Resetnamedvariables()
TheQuery.Setnamedvariable(salary, 55000)
TheQuery.Setnamedvariable(department, Sales)
Set Query$ = salary >= ?salary and department = department
Set doccol = TheQuery.Execute(Query$)

Language cross-reference

ResetNamedVariables method (DominoQuery - Java)