Re: WebDB form textbox info. into PL/SQL, how?

From: Steve Jennings <spj95_at_hotmail.com>
Date: 2000/04/28
Message-ID: <8ecicm$au8$1_at_nnrp1.deja.com>#1/1


If you have a text box called f_name (under WebDB) the data is submitted in the URL as

p_arg_names=f_name&p_arg_values=<f_name's value>.

There is a package called wwv_name_value in WebDB which you can use to access the values.

e.g. to retrieve f_name

f_name := WEBDB.wwv_name_value.get_string(

    p_arg_names  => l_arg_names,
    p_arg_values => l_arg_values,
    p_arg=>'f_name'

);

Note: this is case sensitive.

I find it easiest to just write a procedure to do all the processing or html rendering because of the limitations of the text boxes. Just pass in the l_arg_values and l_arg_names variables. (See below for an example.)

Here is a procedure I find useful to display the arguments and their values for development purposes - just pass in l_arg_names and l_arg_values to display the arguments.

  • display the arguments and their values in a table procedure print_args( p_arg_names WEBDB.wwv_utl_api_types.vc_arr, p_arg_values WEBDB.wwv_utl_api_types.vc_arr ) is begin htp.tableOpen('border="1"');
    • display the table header htp.tableRowOpen; htp.tableHeader(cvalue => 'Name', cattributes => 'width="150"'); htp.tableHeader(cvalue => 'Value', cattributes => 'width="150"'); htp.tableRowClose;
    • print each of the arguments and values as a table row for i in 1..p_arg_names.count loop htp.tableRowOpen; htp.tableData(p_arg_names(i)); htp.tableData(p_arg_values(i)); htp.tableRowClose; end loop;

    htp.tableClose;
end print_args;
-- end procedure

Steve

In article <3909B223.ABBA81E3_at_cas-mddc.com>,   Marcos Leija <marcos.leija_at_cas-mddc.com> wrote:
> How can I call the data from a text box into my PL/SQL which is
 executed
> after the form is submitted?
>
> In otherwords, if I had a text box called f_name, and they entered
> "Marcos",
> I would want to access that info. in PL/SQL
> htp.p('The first name is ' || f_name)
>
> The first name is Marcos
>
> Anyone know how to do this?
> Marcos
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Apr 28 2000 - 00:00:00 CEST

Original text of this message