The first part defined how to establish connectivity between the back end and the front end of the project. Next we will see how to implement triggers.
Oracle
We need to Create the triggers in the oracle.
1) type ed in sql
2) it opens a notepad window
3) type the trigger as in the below example
4) exit the notepad with saving
5)and then type "/"
6) this will show a message as trigger created!
7) It should not show trigger created with compilation errors. If this message is shown check your syntax of trigger.
Example:
create or replace trigger votertrig
after update or delete on voter
for each row
begin
insert into votertemp values(:old.id,:old.name,:old.address,:old.age,:old.gender,:old.dob);
end;
Whenever we perform an update or delete operation the old values get stored into the votertemp table and the changed data gets reflected into the permanent table
Visual Basic 6.0
In VB we do not have to do anything as triggers are automatically fired whenever an update or delete operation takes place. The admin can log in into the oracle and view the modifications including the old as well as new values from the voter and votertemp table.
We have successfully set up triggers in the Oracle Back End and when an user deletes or updates any record through the VB front end application the trigger gets fired. We will see procedures in the next part 3.
Part 3
Oracle
We need to Create the triggers in the oracle.
1) type ed in sql
2) it opens a notepad window
3) type the trigger as in the below example
4) exit the notepad with saving
5)and then type "/"
6) this will show a message as trigger created!
7) It should not show trigger created with compilation errors. If this message is shown check your syntax of trigger.
Example:
create or replace trigger votertrig
after update or delete on voter
for each row
begin
insert into votertemp values(:old.id,:old.name,:old.address,:old.age,:old.gender,:old.dob);
end;
Whenever we perform an update or delete operation the old values get stored into the votertemp table and the changed data gets reflected into the permanent table
Visual Basic 6.0
In VB we do not have to do anything as triggers are automatically fired whenever an update or delete operation takes place. The admin can log in into the oracle and view the modifications including the old as well as new values from the voter and votertemp table.
We have successfully set up triggers in the Oracle Back End and when an user deletes or updates any record through the VB front end application the trigger gets fired. We will see procedures in the next part 3.
Part 3
we are implementing your coding and they are working perfect. Thank you very much.
ReplyDeleteBut we want coding for " delete" and "entering next record" in the same way as given for "add" in your blog.
I sincerely request you to give coding for both urgently as we have exam day after tomorrow.
we have implemented other coding for both of them but they are not working.Please post your coding.we have to finish this project today only.
monikagawai.19@gmail.com