Thread View: comp.databases.oracle.tools
2 messages
2 total messages
Started by Marcos Leija
Fri, 28 Apr 2000 00:00
WebDB form textbox info. into PL/SQL, how?
Author: Marcos Leija
Date: Fri, 28 Apr 2000 00:00
Date: Fri, 28 Apr 2000 00:00
12 lines
1196 bytes
1196 bytes
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
Re: WebDB form textbox info. into PL/SQL, how?
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads