Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL / SQL HtmlForm

Re: PL / SQL HtmlForm

From: Paul Dixon <root_at_127.0.0.1>
Date: Wed, 3 Sep 2003 08:37:22 +0000 (UTC)
Message-ID: <bj4982$hsf$1@visp.bt.co.uk>

"Sandra Auerhammer" <jane21_at_gmx.de> wrote in message news:cecf4f50.0309022248.708e6f33_at_posting.google.com...
> HI.
>
>
> i need a construct like
> <select>
> <option ...>
> <option ...>
> <option ...>
> <option ...>
> </select>
>
> the option tags should be filled by a query like
> select name form Person;
>
>
> how do i get it?
> i must declare the variables which i know only AFETER the select statement
>
>
>
> hto.formOpen
>
> htp.formSelectOpen
> htp.SelectOption
> htp.SelectOption
> htp.SelectOption
> htp.formSelectClose
> htp.formClose

Sandra,

declare a cursor for the query then loop through the records returned by the cursor to populate the select options in the htlm form e.g.

DECLARE CURSOR person_names IS
SELECT name
FROM person;

BEGIN htp.formOpen;
 htp.formSelectOpen;
FOR c_rec IN person_names LOOP
 htp.SelectOption(c_rec.name);
END LOOP;
 htp.formSelectClose;
 htp.formClose;

Paul Dixon Received on Wed Sep 03 2003 - 03:37:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US