More than 1 cursor in a class
I have a class that has 2 different cursors for different queries, audit1 and audit2. which are in 2 different methods. The first query runs fine, but the second one generates a 102 error.
Is there an issue with having more than 1 cursor in a class?
Has anyone seen this before?
Well you can have more than one cursor. The main problem is in the second query, we joined Ens.Messageheader to EnsLib_HL7.Message and referencing the Identifier field of EnsLib_HL7.Message was causing a compiler error on the SQL query. Once that field was removed, everything is fine. The oddity is the query would work fine on the Management Portal SQL web page, but would not work in code.
The error was multiple Referenced macro not defined errors.
Hi David,
The SQLCODE -102 is that you trying to open, close or fetch a unopened cursor: https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=RERR_sql#RERR_sql_101