Home » Developer & Programmer » Forms » No SQL statement for error FRM-40509
No SQL statement for error FRM-40509 [message #329982] |
Fri, 27 June 2008 03:30 |
RickyGilles
Messages: 6 Registered: May 2008 Location: Milan
|
Junior Member |
|
|
I'm rebuilding a form and i've just create a combobox having some operations, which run at the button pressions. Depending on the operation, the button execute a delete or an insert on records flagged. The problem is that when I press the button, the system first ask me to save the change for each record flagged (and i want it doesn't ask me that or ask me at the last record changing) and if i answer it yes, the system give me the error: FRM-40509: Unable to update record. If i see display errors box, there are no SQL statement. I thought i should put the update statement somewhere, but i don't know where and how.
I absolutely need some help
This is the code in the WHEN-BUTTON-PRESSED trigger:
declare
operz_value varchar2(15);
begin
operz_value := :operz;
go_block('dpnstatomese');
first_record;
loop
exit when :cdc_dpn is null;
:operz:=operz_value;
if :flg_blocco = 'S' then
if :operz = 'RIMFIRM' then
set_item_instance_property('DTA_FIRMA',current_record,UPDATE_ALLOWED,PROPERTY_TRUE);
:dta_firma := NULL;
aggiorna;
next_record;
elsif :operz = 'INSAPP' then
set_item_instance_property('DTA_APP',current_record,UPDATE_ALLOWED,PROPERTY_TRUE);
:dta_app := to_date(to_char(sysdate,'DDMMYYYY'),'DDMMYYYY');
aggiorna;
next_record;
elsif :operz = 'RIMAPP' THEN
set_item_instance_property('DTA_APP',current_record,UPDATE_ALLOWED,PROPERTY_TRUE);
SET_ITEM_instance_PROPERTY('UTENTE_APP',current_record,UPDATE_ALLOWED,PROPERTY_TRUE);
:dta_app := NULL;
:utente_app := NULL;
aggiorna;
next_record;
elsif :operz = 'BLOC' then
set_item_instance_property('aa_paghe',current_record,update_allowed,property_true);
set_item_instance_property('mm_paghe',current_record,update_allowed,property_true);
set_item_instance_property('flg_dati_paga',current_record,update_allowed,property_true);
:aa_paghe := NULL;
:mm_paghe := NULL;
if :flg_dati_paga='S' then
:flg_dati_paga:='N';
end if;
aggiorna;
next_record;
elsif :operz = 'SBLOC' then
if :aa_paghe is not null and :aa_paghe is not null then
MSG_ALERT('Passaggio in paghe già sbloccato precedentemente o in default','W',FALSE);
else
set_item_instance_property('aa_paghe',current_record,update_allowed,property_true);
set_item_instance_property('mm_paghe',current_record,update_allowed,property_true);
set_item_instance_property('flg_dati_paga',current_record,update_allowed,property_true);
:aa_paghe := to_char(sysdate,'YYYY');
:mm_paghe := to_char(sysdate,'MM');
:flg_dati_paga:='S';
end if;
aggiorna;
next_record;
elsif :operz is null then
msg_alert('Nessuna operazione sui cartellini selezionata','W',FALSE);
next_record;
end if;
aggiorna;
next_record;
else
aggiorna;
next_record;
end if;
end loop;
set_item_instance_property('DPNSTATOMESE.DTA_FIRMA',current_record,UPDATE_ALLOWED,PROPERTY_FALSE);
set_item_instance_property('DPNSTATOMESE.DTA_APP',current_record,UPDATE_ALLOWED,PROPERTY_FALSE);
SET_ITEM_instance_PROPERTY('DPNSTATOMESE.UTENTE_APP',current_record,UPDATE_ALLOWED,PROPERTY_FALSE);
set_item_instance_property('dpnstatomese.aa_paghe',current_record,update_allowed,property_false);
set_item_instance_property('dpnstatomese.mm_paghe',current_record,update_allowed,property_false);
set_item_instance_property('dpnstatomese.flg_dati_paga',current_record,update_allowed,property_false);
execute_query;
end; [EDITED by LF: added [code] tags to improve readability]
[Updated on: Fri, 27 June 2008 04:11] by Moderator Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Mon Feb 03 09:41:13 CST 2025
|