· Sep 16, 2020

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?

Discussion (2)2
Log in or sign up to continue

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.