Article View: comp.databases.oracle.tools
Article #2Re: WebDB form textbox info. into PL/SQL, how?
From: Steve Jennings
Date: Fri, 28 Apr 2000 00:00
Date: Fri, 28 Apr 2000 00:00
84 lines
2909 bytes
2909 bytes
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@cas-mddc.com>,
Marcos Leija <marcos.leija@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.
Technical Details
Message-ID:
<8ecicm$au8$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3909B223.ABBA81E3@cas-mddc.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11355a,d3c38af735b2c99b X-Google-Attributes: gid11355a,public X-Google-Thread: f5464,d3c38af735b2c99b X-Google-Attributes: gidf5464,public From: Steve Jennings <spj95@hotmail.com> Subject: Re: WebDB form textbox info. into PL/SQL, how? Date: 2000/04/28 Message-ID: <8ecicm$au8$1@nnrp1.deja.com> X-Deja-AN: 616854119 References: <3909B223.ABBA81E3@cas-mddc.com> X-Http-Proxy: 1.0 x31.deja.com:80 (Squid/1.1.22) for client 209.91.91.108 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Apr 28 17:39:36 2000 GMT X-MyDeja-Info: XMYDJUIDsteve_jennings Newsgroups: comp.databases.oracle.tools,bit.listserv.sqlinfo X-Http-User-Agent: Mozilla/4.72 [en] (Windows NT 5.0; I)