Forgive if this is a dumb question, but I'm a little new to IRIS SQL. What does the "iAge" variable represent and what does it do in rs.Execute(iAge) ?
I figured out my problem. You have to use the %FromJSON() method on the database value that is a %DynamicObject type. I had tried this before and it didn't work, but I was using %FromJSON() incorrectly. I didn't realize you have to use it like this: set myVal = {}.%FromJSON(DBvalue). I tried to use it like this - set myVal = DBvalue.%FromJSON() and it errored out of course the DB value type doesn't have the %JSON.Adaptor library as part of it. But I just thought when I saw the error that that was the end of that possibility, and that I wouldn't be able to use %FromJSON() on it. Turns out I was just doing it wrong. ;-)
Ah, I see, I didn't realize you could pass parameters into a SQL Statement that way. Thank you!