Tracking Deleted Records Within SCROLL'd CURSOR
Posted in 1993
Neophyte question follows: (I assume there are many solutions, but...) Situation (bear with my long-winded explanation): You create a 4gl form, etc. One option allows the user to "Query" the database for multiple records using a DECLARE SCROLL CURSOR FOR command so that you can take advantage of FETCH NEXT and FETCH PREV options (to implement same as a menu option -- the Informix demo4gl sample code is the example I am using). Unfortunately, the sample code seems to take the "easy" way out regarding deleting records. You "Select" a queried record and exit out to an optional "Delete-Selected" menu. I on the other hand, I want to be able to delete multiple rows without exiting the "Query" task. Works fine as far as deleting the >actual< database records, but since the CURSOR records are still intact, the NEXT and PREV commands will still display the old data. I assume, from reading the Reference Manual, that the SCROLL'd CURSOR limits your other options (like FOR UPDATE and WHERE CURRENT, etc.). So (finally), for the question: What's the most efficient way to keep the user from seeing "stale" FETCH data. Is there any simple (or simpler way) than keeping some hideous secondary array around to track what records have been deleted? Thanks, Marc Ries