IBM Support

VB Script API Protocol error (eg buffer-size) has been reset

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

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Query","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.1","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
16 June 2018

UID

swg21594022