Forms Code [message #404587] |
Fri, 22 May 2009 06:59 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #406019 is a reply to message #404587] |
Mon, 01 June 2009 13:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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
|
|
|
|