× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A colleague at work helped me resolve the datetime problem (posted in midrange-L list)  by setting the date and time format in both the RPG ctl-opt to *ISO, and in EXEC SQL SET OPTION DATFMT = *ISO.

So now I get data in the cursor. I use FETCH NEXT for up to 5000 rows to get all the selected rows for the subfile.

That works.

But then I do an F5 to clear the data and get fresh data. It changes fast with the team pounding on it, and the date-relevant data get processed. Then I close the cursor.  FWIW, the SQL statement for the cursor is based on an SQL View object.

So the program enables F5 to refresh the screen.

*Here is the issue:*

So the user (me, testing) presses F5 to refresh the screen. It opens the same-named cursor again, okay, but the FETCH returns SQLCODE  = 100.
That's after /closing/ the cursor --EXEC SQL CLOSE M1-- and then opening it again. So I get an empty subfile with zero subfile lines.

But F5 to refresh again, and voila! The data is back!

_(1) Is there a value in the SQLCA after the first OPEN that has the cursor open at the end of data? _

I'm going to clear the SQLCA data when I close the cursor, or before I reopen it, and see if that fixes this, but I'd like to hear from somebody who knows.

_(2) The cursor SELECTs from an SQL View. Each time the View runs it would have changed data. _

_Would opening this cursor as DYNAMIC SENSITIVE SCROLL be a good solution, _so when I do an F5 on the subfile screen, I can position it back to whatever is the current first row in the cursor (i.e. which would also be the first row in the View)/



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.