>Oh, I see it now. It returns a logical to llIskit. I agree I would write it the other way around and I would have enclosed the right-hand side in brackets. Each to their own style :)
>
>Anyway, I would add code to (a) to close any cursor called "MyComponents" first before the SELECT (b) check for a cursor afer the SELECT and before the RECCOUNT() test as additional tests for trapping the problem.
Well, both parts (a) and (b) should NORMALLY not be necessary; but they might help for debugging purposes.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)