Re: Stopping a 4GL Query
Posted in 1991
Harold L. Trammel <hlt@napcc.cvm.uiuc.edu> asks (paraphrasing) - > Users often run a query which takes a very long time to run. > It does not appear possible to interrupt the resulting report: > how should this be done ? There are two parts to this : generating any temp tables required for the query, and actually running the report against the temp tables. For the second part, once you've got a cursor open (say r_curs) something like this works okay: foreach r_curs into p_rec.* if int_flag or quit_flag then exit foreach end if output to report foo(p_rec.*) end foreach After the loop, reset the flags and go back to the menu. For the first part, you need to interrupt the back end, which is cheerfully building temp tables and such like (consider a query with an "order by" not in an index). The means of doing this is given as a function, rsqbreak(), in Informix Tech Notes Spring 1989. I'll cheerfully post the code if someone at Informix will okay it, but it's covered in copyright notices. If you ring 'em, they should be able to fax you a copy. > Harold L. Trammel | hlt@napcc.cvm.uiuc.edu > National Animal Poison Control Center | (128.174.187.6) > College of Veterinary Medicine | > University of Illinois Urbana-Champaign | > Urbana, IL | Hope this helps slightly. -- Cheers - Tony. ____________________________________________________________________________ Tony Heskett: theskett@lhr-sys.ssf-sys.dhl.com | Vox: (+44) 81 747 8330 DHL Systems : Kings House, Great West Road, TW8 9HS | Fax: (+44) 81 747 0875