Re: WEBDB Newbie Please Help..desperate

From: <todecker_at_my-deja.com>
Date: Thu, 04 Nov 1999 08:47:37 GMT
Message-ID: <7vrh79$bo3$1_at_nnrp1.deja.com>


If I get you right the problem is that you want to fill your form with values from a table AND post it to a stored procedure. In this case you have to create a form based on a stored procedure. The stored procedure receives the forms' values and distributes them to the tables.

To fill the form you have to write another procedure. I suppose you have the ID of EMP you want to update. So just get the name of this EMP and the other values you want the form to be filled with and call your form with all the values (sounds somewhat difficult so just have a look on my example):

   procedure call_upd_frm (some_id number)    is

      arg_name                      owa.vc_arr;
      arg_value                     owa.vc_arr;

      p_arg1                      my_table.arg1%type;
      p_arg2                      my_table.arg2%type;
   begin
      arg_name  (1) := 'arg1';
      arg_name  (2) := 'arg2';

      select arg1, arg2
        into p_arg1, p_arg2
        from my_table
       where table_id = some_id;

      arg_value  (1) := p_arg1;
      arg_value  (2) := p_arg2;

      -- Arguments not received from table
      arg_name   (3) := 'arg3';
      arg_value  (3) := 'the value';

      my_frm_on_stored_procedure.show (null, arg_name, arg_value);

end;

I did not try this out, but it should work...

Good luck!

In article <7vm671$f79$1_at_nnrp1.deja.com>,   archanak_at_my-deja.com wrote:
> Hi
> I have created a form based on a table. Some of the fields from the
> form are to be added to two other tables. I wish to write a procedure
> in the form itself maybe after the form is processed that would
> accept these field parameters as input and insert rows in another
table
> However I am not able to refer to these field variables in my
procedure
> any idea how to do it..
> example
> Table emp (name,id)
> made a form on emp (form_emp)
> got the fields name and id in the form entry screen
> added 2 fields degree and grade to this form
> now I want these 2 + name fields to be inserted into another table
> called grade
> (name,grade,degree)
> and I want to write a procedure in he form to do this...
> I dont want to use MAster child table as the appln would later
> involve inserting data in more than 2 table
> Please Please any one working on WEBDB who have a clue please help...
>
> thanks in advance
> archana
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 04 1999 - 09:47:37 CET

Original text of this message