Clear, insert button [message #120653] |
Sat, 21 May 2005 17:32 |
elMiMi
Messages: 5 Registered: May 2005 Location: QTR
|
Junior Member |
|
|
Hi everyone
i'm trying to create a form and have two buttons, one to clear the form or reset it to null and another to insert the info into the table
my pl/sql code for "insert" looks like this but it wouldn't commit until i click on save, what should i do?
begin
insert into supervisor values (:staffid, :fname, :lname, :officeno);
commit;
:staffid:=' ';
:fname:=' ';
:lname:=' ';
:OfficeNo:=' ';
end;
And my clear is like this, but it doesn't work
begin
commit;
:staffid:=' ';
:fname:=' ';
:lname:=' ';
:OfficeNo:=' ';
end;
Thanx
|
|
|
Re: Clear, insert button [message #120659 is a reply to message #120653] |
Sun, 22 May 2005 02:33 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Forms can do all these things for you. There is a clear-form built-in; if you commit the record will be inserted automagically. Don't rewrite forms functionality!
hth
|
|
|
|
|
Re: Clear, insert button [message #120980 is a reply to message #120805] |
Wed, 25 May 2005 05:07 |
Gurusubramanyam
Messages: 79 Registered: July 2001
|
Member |
|
|
Hi,
Please try to utilize oracle forms features.Otherwise you will be loosing the control over transactions.
You can use the control blocks and On Triggers but still you can not acheive everything.
Thanks & Regards,
G.S
|
|
|