Hi,
I did it before, but it spam the joblog with "cursor non open" message...
-----Message d'origine-----
De : RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> De la part de Birgitta Hauser
Envoyé : lundi 8 novembre 2021 17:53
À : 'RPG programming on IBM i' <rpg400-l@xxxxxxxxxxxxxxxxxx>
Objet : RE: Is SQL cursor open?
ATTENTION : Ce message provient d'une source EXTERNE. Veuillez n'ouvrir les liens ou pièces jointes que si vous êtes sûr de l'expéditeur.
I normally close it before I open it, ... but not everybody loves this.
If you are in an procedure you also can close the cursor after ON-EXIT.
Then it is always closed (independent of the procedure ends norally or abnormally), i.e. no need to check anymore.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok) "What is worse than training your staff and losing them? Not training them and keeping them!"
"Train people well enough so they can leave, treat them well enough so they don't want to." (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin Taylor
Sent: Montag, 8. November 2021 17:03
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Is SQL cursor open?
Is there a good way to check if a cursor is open? Would I have to just try it and check the SQLSTATE?
TIA
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!J76aczzK!jZrzlJTXWobl4su2b9GnXK0jw4Swcgozl1oa6-tduS8DbdzVRmXbS7U8fNJajFlaa3hCiw$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!J76aczzK!jZrzlJTXWobl4su2b9GnXK0jw4Swcgozl1oa6-tduS8DbdzVRmXbS7U8fNJajFlru72T_Q$ .
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!J76aczzK!jZrzlJTXWobl4su2b9GnXK0jw4Swcgozl1oa6-tduS8DbdzVRmXbS7U8fNJajFn7hgOPzg$
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!J76aczzK!jZrzlJTXWobl4su2b9GnXK0jw4Swcgozl1oa6-tduS8DbdzVRmXbS7U8fNJajFlaa3hCiw$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!J76aczzK!jZrzlJTXWobl4su2b9GnXK0jw4Swcgozl1oa6-tduS8DbdzVRmXbS7U8fNJajFlru72T_Q$ .
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!J76aczzK!jZrzlJTXWobl4su2b9GnXK0jw4Swcgozl1oa6-tduS8DbdzVRmXbS7U8fNJajFn7hgOPzg$
As an Amazon Associate we earn from qualifying purchases.