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 Go to next message
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

Re: No SQL statement for error FRM-40509 [message #337141 is a reply to message #329982] Wed, 30 July 2008 01:08 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Previous Topic: FRM 90928 error
Next Topic: getting error message while debugging form
Goto Forum:
  


Current Time: Thu Dec 08 16:37:37 CST 2016

Total time taken to generate the page: 0.06275 seconds