Question
· May 1

Embedded Python query

Hi Guys,

How can I use this same objectscript principle in embedded python to get the value of each field in my loop? 

  s sql="SELECT ID, Name, Age FROM Sample.Person WHERE Age="_Myage    

     Set RS=##class(%ResultSet).%New()

    Set Ret=RS.Prepare(sql)

    Set Ret=RS.Execute()

    While RS.Next()

    {

         Set name=RS.GetData(2)

}

it should be similar to this example which lists the whole row but how can I get the value of each field or if I can use GetData?  

 

Thanks

Product version: IRIS 2024.3
Discussion (2)1
Log in or sign up to continue