Updating a column when button pressed
Hello,
I have a ADF master detail table and in the detail table and I would like to add a button. When user select a row and presses the button, I need to update a column value to 'Y'. How can I do this?
I need to have a Yes or No prompt as welll before it gets updated in the db table.
How can I acheive this.
Thanks a lot.
Hi,
if you use ADF, on the button action method, access the ADF biinding, get a hande to the iterator and call getCurrentRow() on it. The set the attribute that represents the column and set Yes or No to it.
Make sure you use PPR to refresh the table when teh button is pressed
Frank
Similar Messages
-
Update command in When-button-pressed.
Hello OTN members,
I have the following situation :
Take an eg.
There are two forms, the first form takes the fiedls such as EMP
NAME, ADDRESS AND DEPT. This record generates a Empid from the
sequence.
The second form selects the empid from the LOV, and other fields
such as Emp Salary, Commission and Bonus Rate(from the same
table) are entered. When a Button is pressed, it should update
the record with the above values where empid in the table is
equal to the empid in this forms first field.
I tried as below in when_button_pressed trigger::
UPDATE EMP SET SALARY = :EMP_BLOCK.SALARY,
COMMISSION = :EMP_BLOCK.COMMISSION etc
where
EMPID = :EMP_BLOCK.EMPID;
The above statement does not update the record in the table.
If there is any other approach for the above please suggest.
Thanks in advance.
Sailesh.
nullHallo,
you can check the number of updated row with the system variable
SQL%ROWCOUNT. So if your where condition doesnt match any rows,
no rows will be updated and also no error message will be
generated. In this case SQL%ROWCOUNT contains 0 after the update
command.
other idea: make surte to commit your changes before querying
the record from another sessuion!
Sailesh (guest) wrote:
: Hello OTN members,
: I have the following situation :
: Take an eg.
: There are two forms, the first form takes the fiedls such as
EMP
: NAME, ADDRESS AND DEPT. This record generates a Empid from the
: sequence.
: The second form selects the empid from the LOV, and other
fields
: such as Emp Salary, Commission and Bonus Rate(from the same
: table) are entered. When a Button is pressed, it should update
: the record with the above values where empid in the table is
: equal to the empid in this forms first field.
: I tried as below in when_button_pressed trigger::
: UPDATE EMP SET SALARY = :EMP_BLOCK.SALARY,
: COMMISSION = :EMP_BLOCK.COMMISSION etc
: where
: EMPID = :EMP_BLOCK.EMPID;
: The above statement does not update the record in the table.
: If there is any other approach for the above please suggest.
: Thanks in advance.
: Sailesh.
null -
Something has happen my ipad air 2 it wont let me download or update any apps, when I press the button do update or download it looks like it is but it doesn't so if anyone knows what's going wind please help me
Do you have any restrictions for purchasing apps on the phone? Settings > General > Restrictions. If you have a Mac computer or another Apple device can you purchase things in the App Store using the same Apple ID on something else?
-
Requerying in WHEN-BUTTON-PRESSED
Hi,
I have two forms. I have a button that opens up modal form 2 from form 1 and passes some parameters. I allow the user to update something in form 2 (which has an effect on form 1). When user exits form 2, I want to requery the block in form 1 so that any updates effected in form 2 can be visible.
I tried putting in a do_key('execute_query') in the WHEN-BUTTON-PRESSED trigger in form 1 after the call to open form 2. This had no effect (probably because it didn't get called when I expected it to). The only way I am able to get the new data (after an update in form 2) is to manually issue a requery in form 1.
Any suggestions would be deeply appreciated!
Thanks,
NiranjanHi Niranjan
Put the Execute_query in the when-new-form-instance of the Called form.
With Regards
Harish
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Niranjan Ramakrishnan:
Hi,
I have two forms. I have a button that opens up modal form 2 from form 1 and passes some parameters. I allow the user to update something in form 2 (which has an effect on form 1). When user exits form 2, I want to requery the block in form 1 so that any updates effected in form 2 can be visible.
I tried putting in a do_key('execute_query') in the WHEN-BUTTON-PRESSED trigger in form 1 after the call to open form 2. This had no effect (probably because it didn't get called when I expected it to). The only way I am able to get the new data (after an update in form 2) is to manually issue a requery in form 1.
Any suggestions would be deeply appreciated!
Thanks,
Niranjan<HR></BLOCKQUOTE>
null -
FRM-40735 WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-01843
Hi everyone
When I run My form in Microsoft Windows Melinem , and I have Button on the form WHEN I press the button it works fine ,but when I run the same form in Microsoft Windows XP and WHEN I press the button it give this message :
FRM-40735
WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-01843
AND I RECOMPILE THE FORM IN Microsoft Windows XP BUT STILL I AM GETING THE SAME MESSAGE
WAITING FOR YOU VALUABLE ANSWER .
BEST REGARDS
JAMIL ALSHAIBANIForms [32 Bit] Version 6.0.8.23.2 (Production)
Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
With the Partitioning option
JServer Release 9.0.1.1.1 - Production
and the script which is used in the button as the following :
DECLARE
CURSOR C1 IS
SELECT ITEM_CODE,AVERAGE_COST,STORE_CODE,ITEM_QUANTITY,TOTAL_COST
FROM IM_GOODS_RECIEVE_DETAILS
WHERE DOC_CODE = :IM_GOODS_RECIEVE_HEADER.DOC_CODE;
LOC_DOC_CODE VARCHAR2(10);
LOC_DOC_DATE DATE;
LOC_ITEM_CODE VARCHAR2(30);
LOC_ITEM_QUANTITY NUMBER(20,3);
LOC_CART_QTY NUMBER(20,3);
LOC_UNIT_CODE VARCHAR2(10);
LOC_TOTAL_COST NUMBER(20,6);
LOC_AVERAGE_COST NUMBER(20,6);
LOC_SUM_QTY NUMBER(20,6);
LOC_BALANCE NUMBER(20,6);
LOC_PRICE NUMBER(20,6);
LOC_BALANCE_COST NUMBER(25,6);
LOC_ITEM VARCHAR2(30);
L0C_TOT_COST NUMBER(20,6);
LOC_TOT_QTY NUMBER(20,6);
LOC_NEW_AVERAGE NUMBER(20,6);
LOC_ON_HAND_QTY NUMBER(20,3);
al_id Alert;
al_button NUMBER;
LOC_SYS_DATE DATE;
BEGIN
SELECT TO_DATE(TO_CHAR(SYSDATE,'DD/MM/YYYY')) INTO LOC_SYS_DATE FROM DUAL;
FOR R IN C1
LOOP
BEGIN
SELECT B.ITEM_CODE ,SUM(NVL(ITEM_QUANTITY,0)) INTO LOC_ITEM ,LOC_SUM_QTY
FROM IM_TRANS_ISSUE_HEADER A,IM_TRANS_ISSUE_DETAILS B
WHERE A.DOC_CODE = B.DOC_CODE
AND B.DEL_STORE = R.STORE_CODE
AND ITEM_CODE = R.ITEM_CODE
AND DOC_DATE BETWEEN :IM_GOODS_RECIEVE_HEADER.DOC_DATE
AND LOC_SYS_DATE
GROUP BY
ITEM_CODE
ORDER BY B.ITEM_CODE ;
exception
when no_data_found then
NULL;
when form_trigger_failure then
show_message(sqlerrm);
raise form_trigger_failure;
when others then
show_message(sqlerrm);
raise form_trigger_failure;
END;
BEGIN
BEGIN
SELECT (NVL(QUANTITY_ON_HAND,0) + (NVL(LOC_SUM_QTY,0))),NVL(ITEM_PRICE1,0),
NVL(QUANTITY_ON_HAND,0)
INTO LOC_TOT_QTY,LOC_PRICE,LOC_ON_HAND_QTY
FROM IM_LOCATION A, IM_INVENTORY B
WHERE A.ITEM_CODE = B.ITEM_CODE
AND A.ITEM_CODE = R.ITEM_CODE
AND A.STORE_CODE = R.STORE_CODE;
LOC_BALANCE := (:IM_GOODS_RECIEVE_DETAILS.ITEM_QUANTITY) - (LOC_TOT_QTY);
LOC_BALANCE := - (LOC_BALANCE);
LOC_BALANCE_COST := ((LOC_BALANCE) * (LOC_PRICE));
L0C_TOT_COST := LOC_BALANCE_COST + :IM_GOODS_RECIEVE_DETAILS.TOTAL_COST;
LOC_NEW_AVERAGE := ROUND(((L0C_TOT_COST)/(LOC_TOT_QTY)),5);
exception
when no_data_found then
NULL;
when form_trigger_failure then
show_message(sqlerrm);
raise form_trigger_failure;
when others then
show_message(sqlerrm);
raise form_trigger_failure;
END;
BEGIN
SELECT 1 INTO :GLOBAL.DUMMY
FROM COST_TEMP_SUM
WHERE S_GOODS_DOC = :IM_GOODS_RECIEVE_HEADER.DOC_CODE
AND S_GOODS_DATE = :IM_GOODS_RECIEVE_HEADER.DOC_DATE
AND S_ITEM_CODE = R.ITEM_CODE;
exception
when no_data_found then
INSERT INTO COST_TEMP_SUM
VALUES(:IM_GOODS_RECIEVE_HEADER.DOC_CODE,
:IM_GOODS_RECIEVE_HEADER.DOC_DATE,LOC_SUM_QTY,LOC_ON_HAND_QTY,
LOC_TOT_QTY,LOC_BALANCE,R.ITEM_QUANTITY,
LOC_PRICE,LOC_BALANCE_COST,R.TOTAL_COST,
L0C_TOT_COST,LOC_NEW_AVERAGE,R.ITEM_CODE,LOC_SYS_DATE);
when form_trigger_failure then
show_message(sqlerrm);
raise form_trigger_failure;
when others then
show_message(sqlerrm);
raise form_trigger_failure;
END;
END;
IF LOC_BALANCE_COST = 0 THEN
UPDATE IM_INVENTORY
SET ITEM_PRICE1 = R.AVERAGE_COST
WHERE ITEM_CODE = R.ITEM_CODE;
ELSE
UPDATE IM_INVENTORY
SET ITEM_PRICE1 = LOC_NEW_AVERAGE,ITEM_PRICE2 = LOC_PRICE
WHERE ITEM_CODE = R.ITEM_CODE;
END IF;
-- THIS FOR ISSUED ITEMS QUANTITY
FOR R2 IN (
SELECT B.ITEM_CODE as LOC_ITEM_CODE, NVL(ITEM_QUANTITY,0) as LOC_ITEM_QUANTITY,
A.DOC_CODE as LOC_DOC_CODE, AVERAGE_COST as LOC_AVERAGE_COST,
TOTAL_COST as LOC_TOTAL_COST,A.DOC_DATE as LOC_DOC_DATE,
CART_QTY as LOC_CART_QTY,UNIT_CODE as LOC_UNIT_CODE
FROM IM_TRANS_ISSUE_HEADER A,IM_TRANS_ISSUE_DETAILS B
WHERE A.DOC_CODE = B.DOC_CODE
AND B.DEL_STORE = R.STORE_CODE
AND ITEM_CODE = R.ITEM_CODE
AND DOC_DATE BETWEEN :IM_GOODS_RECIEVE_HEADER.DOC_DATE
AND LOC_SYS_DATE
-- AND :EXPENSES_TAB.EXP_DATE
ORDER BY B.ITEM_CODE )
LOOP
BEGIN
SELECT 1 INTO :GLOBAL.DUMMY
FROM COST_TEMP
WHERE T_DOC_CODE = R2.LOC_DOC_CODE
AND T_DATE = R2.LOC_DOC_DATE
AND T_ITEM_CODE = R2.LOC_ITEM_CODE;
exception
when no_data_found then
INSERT INTO COST_TEMP
VALUES(R2.LOC_DOC_CODE,R2.LOC_DOC_DATE,R2.LOC_CART_QTY,R2.LOC_ITEM_QUANTITY,
R2.LOC_AVERAGE_COST,:IM_GOODS_RECIEVE_HEADER.DOC_CODE,
:IM_GOODS_RECIEVE_HEADER.DOC_DATE,R.ITEM_CODE,R.STORE_CODE);
when form_trigger_failure then
show_message(sqlerrm);
raise form_trigger_failure;
when others then
show_message(sqlerrm);
raise form_trigger_failure;
END;
Begin
al_id := Find_Alert('POST_DATA');
IF Id_Null(al_id) THEN
Message('User_Warning alert does not exist');
RAISE Form_Trigger_Failure;
ELSE
** Show the warning alert
-- jamil al_button := Show_Alert(al_id);
** If user pressed OK (button 1) then bring up another
** alert to confirm -- button mappings are specified
** in the alert design
-- IF R2.LOC_ITEM_QUANTITY != 0 AND al_button = ALERT_BUTTON1 THEN
IF R2.LOC_ITEM_QUANTITY != 0 THEN
BEGIN
UPDATE IM_TRANS_ISSUE_DETAILS
SET AVERAGE_COST = LOC_NEW_AVERAGE,
TOTAL_COST = LOC_NEW_AVERAGE * R2.LOC_ITEM_QUANTITY
WHERE DOC_CODE = R2.LOC_DOC_CODE
AND ITEM_CODE = R2.LOC_ITEM_CODE ;
END;
END IF;
END IF;
END;
END LOOP;
END LOOP;
GO_BLOCK('IM_GOODS_RECIEVE_HEADER');
:IM_GOODS_RECIEVE_HEADER.FLAG_COST := 1;
COMMIT;
SET_ITEM_PROPERTY('IM_GOODS_RECIEVE_HEADER.PUSH_BUTTON152',ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('EXPENSES_TAB.PUSH_BUTTON151',ENABLED,PROPERTY_FALSE);
SHOW_MESSAGE('The New Cost Price updated Successfully !!!');
END;
BEGIN
IF nvl(:IM_GOODS_RECIEVE_HEADER.FLAG_COST,0) = 1 THEN
Make_Block_Query_Only('IM_GOODS_RECIEVE_DETAILS');
ELSIF nvl(:IM_GOODS_RECIEVE_HEADER.FLAG_COST,0) = 0 THEN
Make_Block_Query_Only('IM_GOODS_RECIEVE_DETAILS');
END IF;
END;
best regards
Jamil Alshaibani -
GO-ITEM - WHEN-BUTTON-PRESSED - SQLAP-10048 - You have not selected a record.
Hi,
I need to use go-item -> execute-trigger(when-button-pressed) personalization in oracle EBS Payables module. However i face certain problem.
When i do 'go-item' to particular 'button', row selection disappear(its a multi row block). In the result i receive an error - 10048 - you have not selected a record.
Manually you just click a button with row selected, and everything goes fine. There must be some kind of a context parameter which is passed from a block/record/row to a button. However how to achieve this through personalization?
Many thanks for every help.
Best regards,
Martinwrite a procedure in forms that disables all your items in that record and call this on When-New-Record-Instance and When-Button-Pressed.
PROCEDURE disable_item IS
BEGIN
IF :<block>.indicator = 'X'
THEN
SET_ITEM_INSTANCE_PROPERTY('<block>.<item>, CURRENT_RECORD, INSERT_ALLOWED, PROPERTY_FALSE);
SET_ITEM_INSTANCE_PROPERTY('<block>.<item>, CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_FALSE);
.. (repeate this t2o Statemnts for every item,
more elegantliy you may write a loop using built-in NEXT_ITEM to get all items and set insert and update off) ...
END IF;
END;
On When-Button-Pressed set the value of :block.indicator to 'X' before calling the disable_item procedure.
Attemtion: This solution assumes that the button is part of your MR block (cited bove as <block>).
... and code is just written down, not tested. -
FRM-40735 WHEN BUTTON PRESSED TRIGGERRAISED UNHANDLED EXCEPTION ORA-01407
WHILE I AM TRYING TO UPDATE A TABLE LIKE:
update mis_dik_adeia
set trexon_etos_days = (select days_per_year
from mis_dik_adeia, mis_plafon_adeivn
where mis_dik_adeia.adeia_id = mis_plafon_adeivn.adeia_id
and mis_dik_adeia.adeia_id between aapo and aews
and mis_dik_adeia.employee_id = apoerg
and mis_dik_adeia.etos = etos1
and mis_plafon_adeivn.years_yphr = ( select max( a.years_yphr ) from mis_plafon_adeivn a where a.adeia_id = mis_plafon_adeivn.adeia_id and a.years_yphr <= eth ));
AND THE COMPILER DOESN'T GIVE ANY ERROR, I TAKE THE BELOW ERROR!
FRM-40735 WHEN BUTTON PRESSED TRIGGERRAISED UNHANDLED EXCEPTION ORA-01407there are two categories of errors: compile-errors and runtime-errors.
In this case the syntax of statement seems OK (no compiler warnings) but running the code gives you a ORA-01407.
Look in your manual which error occured in your form.
Or use error_code and error_text in your Exception-Handling to get those errors in a better readable way.
try it
Gerd -
Frm-40735-when-button-pressed trigger raises unhandled exception ora-01430
Hi,
I am running my developer6i application on winxp on one of my clinet side I got error frm-40735-when-button-pressed trigger raises unhandled exception ora-01430 when I press the button which give me the alter button to select yes or no before this the error araises.. but in the other client side its working correctlly with no such error message on same OS and developer6i version...i suppose you are getting 1403 and not 1430
++++++
Error: ORA 1430
Text: column being added already exists in table
Cause: An ALTER TABLE ADD statement specified the name of a column that is
already in the table.
All column names must be unique within a table.
Action: Specify a unique name for the new column, then re-execute the
statement.
++++++
1403 is no data found
so most likely you are executing a
select ... into ...
which is user dependent through where clause
that might be an explanation to your problem
but more info is needed on that
and surely you must clarify the ORA error you are getting. -
Error -- No Such Trigger('when-button-pressed')
Hi,
I am getting the error ""No Such Trigger('when-button-pressed')"",
when I am executing the code EXECUTE_TRIGGER( 'WHEN-BUTTON-PRESSED' );
on some item(Key-Next-Item), although WHEN-BUTTON-PRESSED trigger exists.
What could be the problem ?. It worked till yesterday, giving error from today, I havent
changed any thing.
Thanks in Advance
DevenderSteve's tip is the only good solution for this case.
The problem in your case for example is:
Let's say you have a block-trigger, which fires after your execute-trigger.
Now a colleague of you, which don't know your code, create a WHEN-BUTTON-PRESSED on an item, then the new code is started and not the block-trigger-code.
So, don't ever do this. Write your code in a package-function or -procedure and call it from the trigger. So you can re-user the functionality
Gerd -
Calling a report from forms - FRM-40735 when-button-pressed raised unhandle
Hi,
I created a form to generate a pdf report.
its not going too well, so i need some help.
my form only has one button , when pressed I want it to generate a report in pdf format.
i created a when-button-pressed trigger and the following code is below:
I also create a web service proxy jar file,
the jar file is in the FORMS_BUILDER_CLASSPATH, and the jar file is imported from forms builder without any issues.
As of now I am hard coding everything in the code below to see if it works.
The error I am getting FRM-40735 when-button-pressed raised unhandled exception ORA-105100 i dont know why ?
This error is occurring at this line of code, please help, this is my first time doing something like this.
obj := publicreportserviceclient.new(); DECLARE
param_name varchar2(200);
un varchar2(200);
pw varchar2(200);
out_file varchar2(200);
obj ORA_JAVA.JOBJECT;
BEGIN
obj := publicreportserviceclient.new();
param_name := 'EMP';
un := 'Administrator';
pw := 'Oracle123';
out_file := 'D:\DevSuiteHome_1\j2ee\home\default-web-app'||'output';
publicreportserviceclient.callRunReport(obj,'/~administrator/Learn/Test1/Test1.xdo','EMP','141414',un,
pw,'pdf','New_Template',out_file);
web.show_document('http://jmenge-de.de.oracle.com:8889/j2ee/' || 'output');
exception
--check for ORA-105101
when ORA_JAVA.EXCEPTION_THROWN then
message('Java Exception : '
|| Exception_.toString(ORA_JAVA.LAST_EXCEPTION));
ORA_JAVA.CLEAR_EXCEPTION;
return;
--check for ORA-105100
when ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
return;
END;This is my java function
public void callRunReport (String reportPath, String paramName, String paramValue, String
username, String password, String format, String template, String outFile) {
try {
bip_webservice.proxy.PublicReportServiceClient myPort = new bip_webservice.proxy.PublicReportServiceClient();
// Calling runReport
ReportRequest repRequest = new ReportRequest();
repRequest.setReportAbsolutePath(reportPath);
repRequest.setAttributeTemplate(template);
repRequest.setAttributeFormat(format);
repRequest.setAttributeLocale("en-US");
repRequest.setSizeOfDataChunkDownload(-1);
ParamNameValue[] paramNameValue = new ParamNameValue[1];
paramNameValue[0] = new ParamNameValue();
paramNameValue[0].setName(paramName);
String[] values = new String[1];
values[0] = paramValue;
paramNameValue[0].setValues(values);
repRequest.setParameterNameValues(paramNameValue);
ReportResponse repResponse = new ReportResponse();
repResponse = myPort.runReport(repRequest,username,password);
byte[] baReport = repResponse.getReportBytes();
FileOutputStream fio = new FileOutputStream(outFile);
fio.write(baReport);
fio.close();
} catch (Exception ex) {
ex.printStackTrace();
}Thanks - please helpIf there is a way to make it work with Bi publisher, Please let me know.
I need to something to make it work with BI publisher.
thanks,
Edited by: Rooney on May 27, 2010 1:27 PM -
How can I call my chart in Forms6i on When Button Press Trigger?
Hi Friends,
I have make a chart in Graphic Builder 6i and save on path C:\graph\test.ogd
Now I want to run this Chart from Form6i on When Button Press trigger.
I have call my report in forms using this command on When Button Press trigger.
Run_Product(reports,'C:\Cheema\Qdir_store\reports\pmms\sec_backlog',asynchronous,runtime,filesystem,TO_CHAR(NULL));
So tell me How can I call my chart in Forms6i?
Please reply me on urgent.
Thanks,
ShahzadJust to recall after a long break of couple of years..... Pls check out if not wrong.
First of all you need to embeed the chart object on your layout window and make it visible = FALSE. This is a design time work. In the button press event, show the chart object by setting the visible property = TRUE.
Note, i could not paste u the sample code as i don't have forms installation on my PC. The above states is a logic you can apply. -
Hye craig, hamid, christian and all ...........
i have a user access interface which i create where there are two fields username and password and a button,
i have also created a table USERS for users which have username and password fields ..... On useraccess interface i coded on WHEN BUTTON PRESSED like this
declare
go_block('users');
execute_query;
declare
begin
if :useraccess.username=:users.username and
:useraccess.password=:users.password then
go_block('MAINPAGE');
else
go_block('USERACCESS');
MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
end if;
end;
This code works for a single user in USERS table but for multiple users there has to be some looping system
which matches the USERACCESS and USERS tables fields thoroughly ....Hi Majid,
I can suggest you a workaround for this. raise a ON-LOGON trigger and you can use the LOGON_SCREEN builtin to flash the logon screen at runtime. And then try capturing the username and password.
DECLARE
connected BOOLEAN := FALSE;
tries NUMBER := 3;
un VARCHAR2(30);
pw VARCHAR2(30);
cs VARCHAR2(30);
BEGIN
SET_APPLICATION_PROPERTY(CURSOR_STYLE, 'DEFAULT');
WHILE connected = FALSE and tries > 0
LOOP
LOGON_SCREEN;
un := GET_APPLICATION_PROPERTY( USERNAME );
pw := GET_APPLICATION_PROPERTY( PASSWORD );
cs := GET_APPLICATION_PROPERTY( CONNECT_STRING );
LOGON( un, pw || '@' || cs, FALSE );
IF FORM_SUCCESS
THEN
connected := TRUE ;
END IF;
tries := tries - 1;
END LOOP;
IF NOT CONNECTED THEN
MESSAGE('Too many tries!');
RAISE FORM_TRIGGER_FAILURE ;
END IF;
END ; a sample piece of coding to help you out.
Regards,
Manoj Chakravarthy -
Calling a function in WHEN-BUTTON-PRESSED
Hello,
i have in when-button-pressed a line containing
select pachet_salarizare.ani_vechime(data_min, to_number(to_char(sysdate,'YYYY')), to_number(to_char(sysdate,'MM'))) into ani_vechime from dual;so i call a function which is in pachet_salarizare package (package created in program units, in Forms).
when compiling, i get: function 'PACHET_SALARIZARE.ANI_VECHIME' mai not be user in SQL.
how can i deal with this? i need the result of that function in a variabie, ani_vechime.
Thanks!Uh, thank you. i thought it's not possible what i wanted..
but strange why cannot be called function in select statements
Regards, -
Ticker bean and WHEN-BUTTON-PRESSED trigger
Hi,
In Forms 6i, I use the Ticker bean. The problem with it, is that it appears on all canevas of my form.
But if the bean is "stopped" (i.e. the clock is stopped), it works fine and it does not appear on the next canevas I show.
However, I must have a button for the "stop" and another one that shows my next canevas. If I put the two code lines in the same WHEN-BUTTON-PRESSED trigger of a unique button, the ticker bean is still visible in the new canevas.
Any help is appreciated.
Regards,
Olivier.Olivier,
I think I remember having heard of this before. The reason for this could be that the ticker bean uses AWT classes, which are heavyweight. All you can try is to call
synchronize;
between starting and stopping the ticker if using one button only. If this doesn't help, then I don't know of any other solution that could work.
Frank -
When-button-pressed---adding a "select statement"
Hi friends,
i have a select statement:
select count(*) from employees
where emp_no=:control.emp_no;
i would like that when i press a button, count for instance, i get the number of employees.
I need the codes used in oracle in the when-button-pressed.
Thanks.DECLARE
RESULT NUMBER :=0;
CURSOR CUR
select count(*) from employees
where emp_no=:control.emp_no;
BEGIN
OPEN CUR;
FETCH CUR INTO RESULT;
:ITEM_NAME := RESULT;
CLOSE CUR
END;
I hope this will help
This will be shown in item, if you want to show a message then use
MESSAGE(RESULT);
Regards
Abbas
Edited by: Abbas on Jul 19, 2011 12:37 PM
Maybe you are looking for
-
Olá, Hoje pela manhã estávamos com um problema no ambiente e algumas NF-es foram geradas. Agora que a situação já voltou ao normal e algumas dessas notas estão com status de em processamento. Quando vamos consultá-las no GRC, não consta nenhum regis
-
Latest update (build 6947)
Having trouble with this release. Lots of display errors. When I try and type text into a table cell, it either doesn't update on screen or a chunk of it or all of it goes blank. The only way I can refresh the screen and update the display that I hav
-
Hi there, I have a problem to compile below sentences. import java.awt.* ; import javax.swing.* ; import java.awt.event.* ; public class p662 extends JFrame public ShowColors() ** invalid method declariration for ShowColors **** super ("Using colors"
-
is there any other way to unlock an I phone?
-
Setting variable in script to result returned in another script
I have two scripts. Using a default answer dialog, the first script returns a result consisting of one word. The second script begins with "set myWord to . . . ." Is there a straightforward way of completing the myWord command with "text returned of