Home » Developer & Programmer » Forms » Forms Code (9i)
Forms Code [message #404587] Fri, 22 May 2009 06:59 Go to next message
MR[T]
Messages: 62
Registered: March 2009
Member
Why do we use : when we do coding in Forms .

	Declare
         Alert Number:=0;
        Begin
         Select EMPNO into :EMPNO From Emp
	       Where EMPNO=:EMPNO;
	       Set_Alert_Property('Warning',TITLE,'Checking The Duplication...');
	       Set_Alert_Property('Warning',ALERT_MESSAGE_TEXT,'This Code Is Already Exist...');
         Alert:=Show_Alert('WARNING');
          Raise Form_Trigger_Failure;
        Exception
         When No_Data_Found Then
         Null;
        End;


I am unable to understand that what is the meaning of :EMPNO in the above program.

Regards
MR{T}
Re: Forms Code [message #404644 is a reply to message #404587] Fri, 22 May 2009 10:24 Go to previous messageGo to next message
TonyJaa
Messages: 50
Registered: May 2009
Member


This statement is use to check if the employee N° :EMPNO exists.

EMPNO is a variables which have to be declare in the declaration section :

Declare
         Alert Number:=0;
         Empno NUMBER;
        Begin
         Select EMPNO into :EMPNO From Emp
	       Where EMPNO=:EMPNO;
	       Set_Alert_Property('Warning',TITLE,'Checking The Duplication...');
	       Set_Alert_Property('Warning',ALERT_MESSAGE_TEXT,'This Code Is Already Exist...');
         Alert:=Show_Alert('WARNING');
          Raise Form_Trigger_Failure;
        Exception
         When No_Data_Found Then
         Null;
        End;


it's also better to assign a value to it.
Re: Forms Code [message #404663 is a reply to message #404644] Fri, 22 May 2009 12:49 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

:EMPNO refers to a field in the form.
Re: Forms Code [message #404683 is a reply to message #404644] Fri, 22 May 2009 15:20 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
TonyJaa, your explanation
TonyJaa
EMPNO is a variables which have to be declare in the declaration section (...) it's also better to assign a value to it.
has nothing to do with a question.
Re: Forms Code [message #406019 is a reply to message #404587] Mon, 01 June 2009 13:00 Go to previous messageGo to next message
MR[T]
Messages: 62
Registered: March 2009
Member
Thanks alot
I have understand that :EMPNO is Field Name ,But what is EMPNO ?


SELECT EMPNO INTO :EMPNO FROM EMP 
WHERE EMPNO=:EMPNP 


In the above example i am selecting EMPNO into :EMPNO .
:EMPNO is my field name , but what is EMPNO .?
Re: Forms Code [message #406028 is a reply to message #404587] Mon, 01 June 2009 14:47 Go to previous messageGo to next message
Kaeluan
Messages: 179
Registered: May 2005
Location: Montreal, Quebec
Senior Member
EMPNO is the column name in the table EMP.
So what the select do is select the column EMPNO from table EMP and put the result in the field :EMPNO in the forms

Hope it help
Re: Forms Code [message #406900 is a reply to message #404587] Sun, 07 June 2009 06:29 Go to previous message
MR[T]
Messages: 62
Registered: March 2009
Member
Thanks alot Kaeluan Smile
Previous Topic: Username and password to logon to Oracle 10g
Next Topic: scanner with OCX
Goto Forum:
  


Current Time: Sun Feb 09 12:14:41 CST 2025