×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




I'd like to be able to test if an SQL cursor is OPEN so I can issue a CLOSE cleanly. My searches through the SQL manuals didn't turn up any SQL equivalent to RPG's %open() BIF.

I have a query program that makes extensive use of dynamically created SQL statements (PREPARE, OPEN, FETCH) and the question of CLOSE has come up. I can do a prophylactic CLOSE just before the OPEN, but the first cycle puts a message into the job log to the effect that the cursor isn't open.

I can always set a flag at OPEN time and test that flag before doing a CLOSE, but I was sort of hoping for an SQL way.
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.