Re: SQL Forms 3.0 and the Copy/Name_in procedure/functions

From: Richard Shields <richards_at_sequent.com>
Date: Wed, 15 Apr 92 16:11:56 GMT
Message-ID: <1992Apr15.161156.29093_at_sequent.com>


I believe you want the procedure to look like this:

procedure tst_cp (blk in char) is
begin

    copy(name_in(blk || '.par_id'), 'GLOBAL.par_id'); end;

-Rich

In article <1992Apr14.152113.3243_at_cas.org> lwv26_at_cas.org (Larry W. Virden) writes:
>I have a series of blocks in a form which have the same field names within
>each.
>
>I would like to write a procedure which, when given the name of a block
>as an argument, would perform some action on the fields in that block.
>
>What I am trying to do is something like:
>
>procedure tst_cp (blk in char) is
>begin
> copy(':' || name_in(blk) || '.par_id', :global.par_id);
>end ;
>
>
>and then I want to call this procedure as:
>
>tst_cp('junk');
>
>so that :junk.par_id is copyed into the global variable par_id.
>
>The problem is that when I get to the copy statement, I get an Undefined
>field or variable reference error from Sql Forms 3.0 .
>
>Anyone have any ideas on what I might be doing wrong here?
>
>I tried changing the above to :
>
>procedure tst_cp is
>begin
> copy(':" || name_in(:global.blk) || '.par_id', :global.par_id);
>end;
>
>and then
>
>:global.blk := 'junk';
>tst_cp;
>
>and got the same results.
>
>
>--
>Larry W. Virden UUCP: osu-cis!chemabs!lvirden
>Same Mbox: BITNET: lwv26_at_cas INET: lvirden_at_cas.org
>Personal: 674 Falls Place, Reynoldsburg,OH 43068-1614
>America Online: lvirden
Received on Wed Apr 15 1992 - 18:11:56 CEST

Original text of this message