Written by

Question Gautam Rishi · Jul 11, 2023

debugging %Library.ResultSet

Hi All,

I am trying to fetch resultset using the below code - 

set rs = ##class(%ResultSet).%New("Simple.Person:ValidateAge")

do rs.Execute()

it is giving me error while the same code I run it through iris terminal worked fine. 
I want to understand that problem behind this. Also how can I check the possible methods that I can use on 'rs' somewhat dir() does in python.

Product version: IRIS 2023.2

Comments

Chad Severtson · Jul 11, 2023

+1 for %ResultSet being deprecated. I'd suggest using %SQL.Statement instead.

For your immediate question, it's a good practice to always check status codes. 

set status = rs.Execute()
if ('status) {
    write $SYSTEM.Status.GetErrorText(status) 
}

You also might find some information in Auditing if there is a security issue. 

0