Home » Developer & Programmer » Forms » updating value of table from textbox which is on form (oracle form 6i)
updating value of table from textbox which is on form [message #599924] Wed, 30 October 2013 04:19 Go to next message
sanjlaxmi
Messages: 24
Registered: October 2013
Junior Member
hi all,
i m doin simple application, in which all data is retrieving from table in to form(all the

field are textbox and button on form) ename,dept,salary,dept_id etc.

i took one textbox field on form which is non table field
(no db field bt linked to another table..via LOV m retrieving value into this textbox which

suppose dept_id )
and now after selecting one record from list box into textbox which is non table field....
after immdiately selecting i want to update one field into db field which all other form

field contains...
so how to do this??which trigger i hav to use for this?

if :dept_id is not null then
begin
update dept
set loc =:emp.loc
where dept_id = :emp.dept_id;
forms_ddl('commit');
exception
when others then
null;
end;
end if;

it giving error.......if m using commit in this...i hav used post query trigger ...is dere

any other trigger hav to use

pls pls try to solve this ...
thanx in advance









  • Attachment: query.png
    (Size: 25.87KB, Downloaded 715 times)
Re: updating value of table from textbox which is on form [message #599935 is a reply to message #599924] Wed, 30 October 2013 05:19 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Are you sure you want to do that? COMMIT - wherever you execute it - commits changes you've made in any item, not only UPDATE statement. You'd "silently" commit everything someone did, including modifying employee's name to "Mickey Mouse".

I don't understand what problem you are trying to solve. Why would you modify DEPT table through this form (based on EMP table) and this particular action (selecting a value from LoV)?
Re: updating value of table from textbox which is on form [message #599942 is a reply to message #599935] Wed, 30 October 2013 05:46 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
Dear try to put your code In TRIGGER-->PRE-COMMIT & whatever you trigger is firing 4 saving data just
clear_block(do_commit);

regard
mughal

Re: updating value of table from textbox which is on form [message #600017 is a reply to message #599942] Wed, 30 October 2013 21:01 Go to previous message
sanjlaxmi
Messages: 24
Registered: October 2013
Junior Member
thanx ..for replying Smile
have tried ....bt its working for post change trigger
Previous Topic: pop list values
Next Topic: How to create MASTER_DETAIL form Manually
Goto Forum:
  


Current Time: Thu Apr 18 03:48:46 CDT 2024