How could we get columns' data inside %Library.ProcedureContext and %SQL.ClassQueryResultSet ?‽?
Hello,
I have created my first table in Ensemble:
And I have added a row using the Production:
We would like to query it, and we would expect to get a row wih all the previous' image data.
I have tried, inside a code block in a Bussiness Process:
set statement=##class(%SQL.Statement).%New()
set status = statement.%PrepareClassQuery("TablasBBDD.NotificacionesPUSH.RelacionAplicacionNotificacion","seleccionarTodo")
set result = statement.%Execute()
do result.%Display()
$$$LOGINFO("filas result: "_result.%ROWCOUNT)
$$$LOGINFO("result: "_result)
//$$$LOGINFO("clave: "_result.%Get("clave"))
$$$LOGINFO("resultado actual: "_result.%CurrentResult)
$$$LOGINFO("resultado siguiente: "_result.%Next())
So then we observe the following in a trace:
We have one row:
The class name is:
How could we get the current result? Because of as loginfo from the following instruction: $$$LOGINFO("resultado actual: "_result.%CurrentResult)
we get:
And there is not next:
The question is:
Considering we have just executed the following query:
{
SELECT * FROM TablasBBDD_NotificacionesPUSH.RelacionAplicacionNotificacion
}
How could be get the result's columns' data???
I tried to use:
//$$$LOGINFO("clave: "_result.%Get("clave"))
However it does not work, because it makes bussiness process crash.
I have read the following:
- https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
- https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?K...
- https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?K...
- https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
- https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GS...
- https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cl...
- https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cl...
- https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cl...