Re: how to change a record's status from insert_status to changed_status ?!!
Date: 2000/07/26
Message-ID: <sntqoq3l3j1136_at_corp.supernews.com>#1/1
"sam" <sam_eh_at_hotmail.com> wrote in message
news:397ECE03.C71A6A27_at_hotmail.com...
> hi
> i want to change a record's status from insert_status
> to changed_status but every time i use :
> set_record_preporty(1,'column_name',status,changed_status);
> it give me an error message :(FRM-40742 illegal status conversion insert
> to changed)
> is there any other way?
> thanks
I don't believe there is.
Just curious - what are you trying to do? Changing a record from INSERT to CHANGED would make Forms generate an update statement rather than an insert statement.
If you're trying to intercept Forms' standard processing to have it update a record rather than insert one, use an ON-INSERT trigger instead:
declare
v_dummy varchar(1);
cursor mycursor is
select 'x'
from mytable
where <key_column> = :MYBLOCK.KEYCOLUMN
for update of SOMECOLUMN;
begin
open mycursor;
fetch mycursor into v_dummy
if mycursor%found then
- Update the record update MYTABLE set columnname = :MYFORM.COLUMNNAME, othercolumnname = :MYFORM.OTHERCOLUMNNAME where current of mycursor; close mycursor; else
- continue with standard processing close mycursor;
- Forms built-in "insert_record" will insert
- the record as usual insert_record; end if; exception when OTHERS then if mycursor%isopen then close mycursor; end if; end;
HTH, Matt Received on Wed Jul 26 2000 - 00:00:00 CEST