Tom,

If you have code that you run repeatedly as custom form actions, you can
also use R:BASE's built-in facility for storing and running code on demand,
Stored Procedures.  When you reduce both approaches (stored procedures and
RUN SELECT) to their basics, what you just learned to do is little different
from a stored procedure.  Stored procedures are called like functions, can
accept a standard argument list, pass results back to the calling program,
and if programmed properly, can effectively use local variables.  (Larry may
nitpick this last point; what I like to do is use variables in stored
procedures that begin with the letter 'p', then at the end, CLEAR VAR p%.
The variables aren't truly local, but the SP has no variable footprint after
the CALL, so I can pretend they're local.)

Of course, you can do all those same things (except the function-like call)
with RUN SELECT.


Emmitt Dove
Manager, Converting Applications Development
Evergreen Packaging, Inc.
[email protected]
(203) 214-5683 m
(203) 643-8022 o
(203) 643-8086 f
[email protected]

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tom
Frederick
Sent: Saturday, October 10, 2009 12:22 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: RMD files stored in the Database

Emmit, Karen, Doug, Razzak,
Thank you very much for your help with retrieving apps from a table 
using RUN SELECT. It took me a while to understand what was going on and 
set up the process so it works. It only took me two hours to figure out 
I had commented out 5 lines (that did the actual work) in a Custom Form 
Action used in the RUN SELECT. Once I had that, it just moved along. All 
together the eventual versions will slim down over 500 EEPs by 12 lines 
each and drop 25 repeated Custom Form Actions down to 1. I think this is 
going to become a regular feature. It sure will help future editing.

Tom Frederick
Jacksonville, IL


On 10/9/2009 3:17 PM, A. Razzak Memon wrote:
> At 10:43 AM 10/9/2009, Tom Frederick wrote:
>
>> I recall reading about this but cannot find it help files or stored
>> emails. Any suggestions?
>
> Tom,
>
> Take a look at R:Docs 7.6 that includes a technique to demonstrate
> the use of executing a command file stored as VARCHAR in a table to
> create and clear global variables required to run the application.
> No external code (command or eep) whatsoever.
>
> Let me know if you need another example, or we will show you a live
> application when you are here at the conference next week.
>
> Very Best R:egards,
>
> Razzak.
>
>
>


Reply via email to