Yes, reason for using it is because I can't created a stored procedure in the database via DBVisualizer.
It gives same error with/without semicolon.
Queries work 100% from within DBVisualizer.
Seems issue lies with the Fetch section in Class ....ReportStoredProcs Extends %RegisteredObject
The insert works 100%, but below fetch only returns 3 rows instead of 7, if I remove Quit $$$OK , then I get 7 rows, but of course it returns an error
s rsFetchTempData = ##class(%ResultSet).%New()
s sc = rsFetchTempData.Prepare("SELECT * FROM TableA")
if 'sc q sc
s sc = rsFetchTempData.Execute()
if 'sc q sc
s qHandle = rsFetchTempData
{
s sc = qHandle.Next()
if (qHandle.Next())
{
// Fetch the current row
s Row = $LB(qHandle.Get("Col1"), qHandle.Get("Col2"), qHandle.Get("Col3"), qHandle.Get("Col4"), qHandle.Get("Col5"), qHandle.Get("Col6"), qHandle.Get("Col7"))
}
else
{
s AtEnd = 1
s Row = ""
}
Quit $$$OK
}
Fixed the Fetch section, now the fetch returns 7 rows. So issue sorted.