Implementing procedures using parameters

Procedure for deletion of record

This is the procedure to which we are passing the parameter called in.
Write this procedure in oracle.

create or replace procedure del(n in number)
is
begin
delete from stud where rno=n;
end;

Write this code in VB. You can write this at onclick event of command button for example.

Set com = New ADODB.Command
com.ActiveConnection = con
com.CommandType = adCmdStoredProc
com.CommandText = “del(” & Text1.Text & “)”
com.Execute

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s