Home » Developer & Programmer » Forms » sequence on code
sequence on code [message #251890] Tue, 17 July 2007 01:55 Go to next message
ashish_pass1
Messages: 114
Registered: August 2006
Location: delhi
Senior Member
hello sir.

i m facing problem. unable to solve can u please point out my mistake.
my requirement is to provide serial no or code to new entry.

	begin
					message('03');
					
				
					select to_char((nvl(nu_end_number,0)+1))
 						into :mst_reason.vc_reason_code 
 						from mst_control
 						where vc_control_code = 'Q' 
 						and vc_comp_code = :global.vc_comp_code
						for update of nu_end_number nowait;
						message('04');
				exception
						when others then
							IF dbms_error_code = -54 or error_code = 40735 Then
							set_alert_property('alrt_date',alert_message_text,
							'This record is being modified by another user. Try again !');
						        alt_var := show_alert('alrt_date');
							RAISE Form_Trigger_Failure; 
							message('05');
						 END IF;
				end;



while adding new entry i got the message
'This record is being modified by another user. Try again !'
please suggest me what i had done mistake on
code--
sir please dont provide me other code. modify on my code

thanxx

regards


[Updated on: Tue, 17 July 2007 02:10]

Report message to a moderator

Re: sequence on code [message #251912 is a reply to message #251890] Tue, 17 July 2007 02:32 Go to previous message
zameersait
Messages: 16
Registered: July 2007
Junior Member
Hi Ashish,

Seems like the statement 'for update of nu_end_number nowait' is not required in your sql statement since u dont hav to lock the current record(s) for any update.

Regards
Zameer
Previous Topic: Error compile the forms which refers to synonyms table
Next Topic: HOST Command Equivalent In Forms 9i
Goto Forum:
  


Current Time: Fri Sep 27 00:16:25 CDT 2024