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
Asked
Active
Viewed 43 times
0
-
See https://stackoverflow.com/questions/3940587/calling-oracle-stored-procedure-from-c – OldProgrammer Sep 11 '19 at 20:12
-
I am looking for the solution specific to drop down – user1882624 Sep 12 '19 at 01:54
1 Answers
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