An error occurs when executing ExecuteScalar method from SmartObjectClient API

  • 24 February 2022
  • 0 replies
  • 7 views

Userlevel 5
Badge +20
 

An error occurs when executing ExecuteScalar method from SmartObjectClient API

kbt144558

PRODUCT
K2 blackpearl
BASED ON
K2 blackpearl 4.6.11
TAGS
K2 API
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

When using the ExecuteScalar method to execute a SmartObject from SmartObjectClient API, an error occurs as below.

 

"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"

Symptoms

This error appears when call ExecuteScalar is followed by ExecuteList in sequence within a SINGLE SmartObjectClientServer connection.

 

Image

Troubleshooting Steps

A workaround for this is to create a new SmartObjectClientServer connection for each ExecuteScalar and ExecuteList call.

0 replies

Be the first to reply!

Reply