0

I have stored procedure for Add, Delete and update.. I want create an drop down in visual basic with items Add,Delete and update. When I select Add, the procedure for Add should be called

user1882624
  • 303
  • 2
  • 4
  • 16

1 Answers1

0

This will achieved by passing one extra parameter to proc. If drop down values is equal to ADD then you can pass p_action parameter as 'ADD' in below proc so that your only add part will execute.do the same for delete and update.

create or replace procedure do_trans(p_par number,p_action varchar2(10))
begin
    if p_action='ADD' then
        --your addition code
        .
        .
    elsif p_action='DELETE' then
       --your deletionn code
        .
        . 
    elsif p_action='UPDATE' then        
       --your UPDATION code
    end if;   
exception when others 
    --your exceptionhaldling code
end;
CMK
  • 40
  • 2
  • 10