Oracle and VB 6.0 Connectivity (Part 2)

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.
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.

create or replace trigger votertrig
after update or delete on voter
for each row
insert into votertemp values(,,:old.address,:old.age,:old.gender,:old.dob);

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


One thought on “Oracle and VB 6.0 Connectivity (Part 2)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s