× 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.



 >> I see where you're coming from I think, but maybe an explanation (or a
link) to why it's a no-no would be helpful.

I'm afraid I haven't the time to dig out the link in the archives, but this
has been extensively discussed here before.

The way I view it is that it is OK to do this if the requirement is to
return fixed information that the subproc is responsible for
holding/generating.  What's the next invoice/PO/Customer number type of
thing.  But if the data changes on each request (e.g. the subproc is
building up a "record" that is the combination of a number of DB hits plus
calcs) then you run into issues of "ownership".  By definition a
subprocedure can be called from different points in an application.  If you
have it return a pointer to its internal storage, then the data can be
changed behind the back of the code that requested it because another
routine has called the subproc and requested a different "record'.  If the
data is not that large (say <200 bytes or so) I'd simply return it.  If the
data is too large for this approach, return the data as parm and return a
count (if returning a set) or a flag (sucess/fail).

Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.