##class(%SQL.Statement).%ExecDirect() method not work
Hi Team,
When I use below statement , I got SQLCODE=0.
SET rs = ##class(%SQL.Statement).%ExecDirect(, "SELECT * FROM LISDB.ExternalUsers WHERE UserId = 83")
If I display above query using Write (rs.%Display()) it gives me below result but (rs.%Get("Prefix")) method give me null value.
.png)
Please help
Discussion (1)0
Comments
Maybe the "Next" method is missing.
Ex:
SET rs = ##class(%SQL.Statement).%ExecDirect(, "SELECT * FROM LISDB.ExternalUsers WHERE UserId = 83")
do rs.%Next()
write rs.%Get("Prefix")
If that doesn't work, put the command sequence you're running.