|
I thought of that David, but if I am doing a one record read, then why use a cursor? For example if I have a file ITEMMASTER with a primary key constraint on ITEMNUM why would I use a cursor to do the following? select price into :listprice from itemmaster where itemnumber=:itemnum I can just see Pluta, "I wouldn't use a cursor either, I'd use a traditional rpg chain." :-) But I guess it's like, and not like, using the rpg cycle to open/close your files. If I use a cursor then it's an explicit open/close. If I don't I then it's an implicit open/close. The only difference between it and the cycle is that the implicit open is upon the execution of the select into versus the start of the program. And the implicit close (depending on CLOSQLCSR) is at the end of the activation group versus the end of the program. I've kind of danced around activation groups. But this is where you really have to know your beans is activation groups and SQL. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin
As an Amazon Associate we earn from qualifying purchases.
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.