The cursor error -502 was caused by the cursor name having a white space and that caused firebird to truncate the cursor name where the white space started, the following characters that firebird did not use as the cursor name, were what that differentiated the name of the cursor from another and therefore the error. However something changed in version 3.010 of firebird in one of two respects. Because that behavior must have been going on for a long time on my system. But it is now that I updated to version 3.010 (before I had 3.07) that this is presented. What could have changed in firebird:
1. That now it does comply strictly in the comparison of strings with the SQL standard and the white spaces at the end are irrelevant.
2. Or now firebird doesn't like whitespace in cursor names.
I already fixed the problem. Preventing white space from reaching the cursor naming mechanism.
And that's right, it's C++
Anyway, thanks for the help. The desire to collaborate that exists on the Internet never ceases to impress me. Thank you very much again.