Troubleshooting
Problem
Using the GetQueryDef method in a VBScript to run a query and filter the results to show only entries with a date greater than a date specified.
Symptom
The query runs fine not useing the AddFilter or use a parameter in the query.
Adding either of those results in the following error:
API protocol error: an attempt to access a result set was made but some result-set parameter (eg buffer-size) has been reset since the last call to Execute
Here is a snippet from the script:
set workspace = currentSession.GetWorkSpace
Set querydef = workspace.GetQueryDef ("Public
Queries/Facets/Clearquest_to_Facets_Export")
This does not work
' set Operator = querydef.BuildFilterOperator(AD_BOOL_OP_AND)
' Operator.BuildFilter "Date_Changed", AD_COMP_OP_GTE, "2012-04-16"
' set querydeffields = querydef.QueryFieldDefs
' Set querydefitem = querydeffields.Item (1)
' querydefitem.SortType AD_SORT_ASC
' querydefitem.SortOrder 1
This does not work
' Set rsltset = CurrentSession.BuildResultSet(querydef)
' rsltset.AddParamValue 1, "2012-04-16 00:00:00"
rsltset.EnableRecordCount
rsltset.execute
status = rsltset.MoveNext
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21594022