Hi Friends,
In my business process I am updating cache table using dynamic query.
ex:
Set result=##class(%ResultSet).%New("%DynamicQuery:SQL")
Set sc=result.Prepare("SELECT %ID, Name, Salary FROM Sample.Employee WHERE Salary > ?")
If $$$ISERR(sc)
{
// here I want to capture the error details in trace , log , that I can see in production web page
}
could you please provide any suggestions to grab the error message.
I tried
Do DisplayError^%apiOBJ(sc)
Do $SYSTEM.OBJ.DisplayError(tSC)end up with no class found , methods found errors.
I have spent 5 hours today for so



.png)

.png)