Ref Cursor Problem in Oracle Forms 6i
Hi all.
In Oracle Forms 6i, can not I do this?
DECLARE
TYPE CUR_REF IS REF CURSOR;
CUR_PRODUCTS CUR_REF;
VAR_QUERY VARCHAR2(3000) := 'SELECT something FROM table';
BEGIN
OPEN CUR_PRODUCTS FOR VAR_QUERY;
END;
It generates error on opening that it expects a SELECT statement.
How can I open a dynamic ref cursor in Oracle Forms 6i??? The same thing works fine in PL/SQL.
Regards,
Zaaf
Thanks in advance.
It could be like this:
PROCEDURE dynamic_cursor ( PC$Clause IN Varchar2 )
IS
cursor_number EXEC_SQL.CursType;
-- Variables for the data to be returned into
LC$ACTYPE Number;
-- Control variables
LN$count Number;
LC$sql_order Varchar2(256);
BEGIN
-- Open the cursor --
cursor_number := Exec_SQL.Open_cursor;
-- build the complete SQL order --
LC$sql_order := PC$clause ;
-- Parse the SQL order --
EXEC_SQL.PARSE(cursor_number, LC$sql_order);
-- Define the columns for the data to be returned --
EXEC_SQL.DEFINE_COLUMN(cursor_number,1,LC$ACTYPE);
-- Execute the Cursor --
LN$count := EXEC_SQL.EXECUTE(cursor_number);
-- Loop and fetch each row from the result set --
While EXEC_SQL.FETCH_ROWS(cursor_number) > 0 Loop
EXEC_SQL.COLUMN_VALUE(cursor_number,1,LC$ACTYPE);
begin
select chqfac, pasfac, indbcr ,
staxfl, excise, incchg, cat001 , trntyp , subtyp
into s_chkbok, s_pasbok, s_intber,
s_staxfl, s_excise, s_incchg, s_cat001 , ss_trntyp , ss_subtyp
from stfeacty
where brancd = s_brancd
and actype = LC$ACTYPE;
s_actype := LC$ACTYPE ;
exception
when no_data_found then
NULL;
when too_many_rows then
NULL;
end;
End Loop ;
-- Close the cursors
EXEC_SQL.CLOSE_CURSOR(cursor_number);
EXCEPTION
When EXEC_SQL.INVALID_CONNECTION Then
message('Unexpected Invalid Connection error from EXEC_SQL');
When EXEC_SQL.PACKAGE_ERROR Then
message('Unexpected error from EXEC_SQL: '||to_char(EXEC_SQL.LAST_ERROR_CODE)|| EXEC_SQL.LAST_ERROR_MESG);
If EXEC_SQL.IS_OPEN(cursor_number) Then
EXEC_SQL.CLOSE_CURSOR(cursor_number);
message('Exception - Cleaned up Cursor');
End if;
END; That you could call with the following:
dynamic_cursor('SELECT ac_type FROM SYSADM.SAVINGS');But, if the query is as simple with only the table name change, you could aslo use a simpliest solution based on a record group.
Francois
Similar Messages
-
Will REF CURSOR support for Oracle Forms 6i?
Hi,
I need to use ref cursor in my from. My cursor query should be dynamically append the "where clause". Hence I used the dynamic query with ref cursor.
But my problem is , when I compile the form it gives error for the line " OPEN emp_record FOR l_query;"
You need to use "select" statement.
Is there any solution for this in forms?
I know it supports for other PL/SQL areas.
Please help me. below is my code sample,
DECLARE
TYPE emp_refcur IS REF CURSOR;
emp_record emp_refcur;
TYPE rec_emp_data IS RECORD
emp_no VARCHAR2(40),
emp_rec rec_emp_data;
l_query VARCHAR2(4000);
BEGIN
l_query := 'SELECT empno
FROM emp ';
IF :CONTROL.ename IS NOT NULL THEN
l_query := l_query||' AND ename = '''||:CONTROL.ename||''' ';
END IF;
OPEN emp_record FOR l_query;
LOOP
FETCH emp_record INTO emp_rec;
EXIT WHEN emp_record%NOTFOUND;
dbms_output.put_line(emp_rec.emp_no);
END LOOP;
CLOSE emp_record;
END; Thanks
RajeshHi,
It's been a while since I used Forms 6i, but I remember hitting a similar problem. I don't think (and stress think!) that the PLSQL engine that comes with Forms 6i recognises ref_cursors.
The work-around I used was to move the functionality to the database and call it from forms.
Hope this helps.
Regards
Ian -
Using ref cursor in after parameter form in reports
hi everyone,
I have problem in usage of ref cursor in after parameter form. My actual requirement is I have user parameter :p_minval, :p_maxval. The values into these user parameters will be coming dynamically using sql_statement as shown below
select min(empid),max(empid) into :p_minval, :p_maxval from emp where empid in (:p_emp);
I will be writing this query in the after parameter form
:p_emp is a lexical parameter as per me but the after parameter form is taking it as a bind variable. so I decided to define a ref cursor and then use it for retrieve. But when I use ref cursor it is returning pl/sql error 591 saying that this is not supported by client side can anyone help me plz..
The following is the code i tried to use in after parameter form
function afterPform return boolean is
type rc is ref cursor;
l_rc rc;
sqlstmt varchar2(512);
begin
sqlstmt:='select min(empid),max(empid) from emp where empid in ('||:p_emp||')';
open l_rc for
select max(empid) from emp where empid in ('||:p_emp||')';
fetch l_rc into :p_maxval;
close l_rc;
return(true);
end;
thanks & regards
venkatI ran into the same problem. any body knows why?
-
Ref.Cursor Problem - URGENT
Hi Friends,
For my report ( calc.rdf ) ,
I am passing two input parameters P_Client_ID, P_Plan_ID.
In .rdf, I had a ref.cursor for selecting records based on
two input parameters values.
case1:
P_client_ID = 'SRINI'
P_Plan_ID = '3232'
My report is generating the output for plan 3232.
case2:
P_client_ID = 'SRINI'
P_Plan_ID = NULL
My report is generating the output for all plans.
case3:
P_client_ID = 'SRINI'
P_Plan_ID = '3232,3257,3259'
My report is not generating any output here.
Only blanck page i am getting.
How can i pass multiple plans to ref.cursor at a time ?
Note:
I now, we cannot make Lexical references in a PL/SQL statement.
Any other way to solve this problem ?
Thanks for Help,
sriniI think that you work with 'static' ref cursor.
From Oracle 8.1.5, we can use 'dynamic' ref cursors.
With 'dynamic' ref cursor we can avoid the use of lexical parameters in Reports 3.0 / 6i.
With 'static' ref cursor this is not possible in all cases.
For example, if we need dynamic WHERE, we practically can't use 'static' ref cursor.
Example for 'dynamic' ref cursor (dynamic WHERE)
1. Stored package
CREATE OR REPLACE PACKAGE report_dynamic IS
TYPE type_ref_cur_sta IS REF CURSOR RETURN dept%ROWTYPE; -- for Report Layout only
TYPE type_ref_cur_dyn IS REF CURSOR;
FUNCTION func_dyn (p_where VARCHAR2) RETURN type_ref_cur_dyn;
END;
CREATE OR REPLACE PACKAGE BODY report_dynamic IS
FUNCTION func_dyn (p_where VARCHAR2) RETURN type_ref_cur_dyn IS
l_ref_cur_dyn type_ref_cur_dyn;
BEGIN
OPEN l_ref_cur_dyn FOR
'SELECT * FROM dept WHERE ' || NVL (p_where, '1 = 1');
RETURN l_ref_cur_dyn;
END;
END;
2.2 Query PL/SQL in Reports
function QR_1RefCurQuery return report_dynamic.type_ref_cur_sta is
begin
return report_dynamic.func_dyn (:p_where);
end;
Note that Oracle Reports 3.0 / 6i needs 'static' ref cursor type for building Report Layout.
So, in package specification we must have both ref cursor types, static for Report Layout
and dynamic for ref cursor query.
Regards
Zlatko Sirotic -
How to out Dynamic ref cursor from Procedure to Forms
Hi
I am trying to out Dynamic ref cursor from Procedure to Forms, But I am unable to do so. however cursor return the value within procedure but I am failed to capture the same in Forms
Pl advice suggestion if any, Here I am attaching full procedure for reference
CREATE PACKAGE winepkg
IS
TYPE wine IS RECORD ( mynumber number);
/* Define the REF CURSOR type. */
TYPE wine_type IS REF CURSOR RETURN wine;
END winepkg;
CREATE procedure find_wine
(col1_in in number,
c1 out winepkg.wine_type) as
vsql varchar2(1000);
cur sys_refcursor;
x number;
BEGIN
vsql:='select bo_id from bo_details where bo_details.bo_id = '||col1_in ;
open cur for vsql;
c1:=cur;
--fetch c1 into x;
--dbms_output.put_line(x);
END find_wine;
In front end forms
Declare
TYPE F is REF CURSOR;
CUR_F F;
rec number;
Begin
break;
find_wine( 1601480000011078,cur_f ) ;
Loop
fetch cur_f into rec ;
Message(rec ) ;pause;
exit when cur_f%notfound ;
End loop ;
exception
when others then
Message(sqlerrm) ;pause;
End ;yo can use
declare
c_cursor EXEC_SQL.CursType;
v_stmt varchar2(2000) = 'select a, b, c from mytab where cond1'; -- you can create this value dynamically
begin
c_cursor := Exec_SQL.Open_cursor;
EXEC_SQL.PARSE(c_articulos, v_stmt);
EXEC_SQL.DEFINE_COLUMN(c_articulos,1, v_colchar1, 30);
EXEC_SQL.DEFINE_COLUMN(c_articulos,2, v_colchar2, 15);
EXEC_SQL.DEFINE_COLUMN(c_articulos,3, v_colchar3, 30);
v_exec := EXEC_SQL.EXECUTE(c_cursor);
WHILE EXEC_SQL.FETCH_ROWS(c_cursor) > 0 LOOP
EXEC_SQL.COLUMN_VALUE(c_cursor,1,v_colchar1);
EXEC_SQL.COLUMN_VALUE(c_c_cursor,2,v_colchar2);
EXEC_SQL.COLUMN_VALUE(c_c_cursor,3,v_colchar3);
assign_values_to_block;
END LOOP;
EXEC_SQL.CLOSE_CURSOR(c_cursor);
end;
and WORKS IN FORMS 6 -
Problem Querying Oracle Forms Using a Date Field and a Format Mask
Hello,
We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
- The Oracle Database version we are running is Release 10.1.0.5.0.
- The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
Thanks,
KrisThere is no obvious reason that I can see.
Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem. -
List Item problem in oracle forms
Hi,
I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
Clear_list()
Create_Group_From_Query( )
Populate_list()
The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
Thanks in advance
Shweta.Hi Shweta,
Please post your query in Oracle Forms discussion forum.
Thanks,
Wilson. -
List items problems in oracle forms 6i
Hello friends,
I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
Clear_list()
Create_Group_From_Query( )
Populate_list()
The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
Thanks in advance
Shweta.I have a question related to this post...what if you want the first item on the list to be the null record - but have it at the top of the list - like all other drop downs I've seen? I'm running on forms 9i
Edited by: saburo on Mar 2, 2010 7:58 AM -
How to write REF-CURSOR Query in Oracle Reports
Hello Guys!!
I have a form in which you can select regions/divisions/locations etc by the use of check boxes. And the selected values will be inserted into a table, and based on the selected values of the table the report is run.
The issue I have is with the query inside the Oracle reports(attached to this file).
The query works fine until the last two EXISTS conditions.
IF a region exists In the table report_param then it works fine but if there are no divisions in it , then the query returns no values, which is not correct.
Someone has advised me to use a ref-cursor query inside reports tool, which I am not aware off. So, anykind of suggestions or advises are welcome. Please let me know about it as it is very urgent issue for me. Anykind of help would be greatly
appreciated.
Thanks,
Vishal
-------------------------------------------------------Query in Oracle Reports---------------------------------------------------------
select c.key_segment, p.supplier_id,
decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>')) COL_NM,
sum(a.ext_price) sales_dols,
sum(comp_allow_pkg.get_comp_allow_stddiv(a.control_loc_id, a.product_id, a.sold_to_customer_id,
a.doc_dt, a.ext_price, a.units)) cust_reb_dols,
sum(a.units) units,
sum(a.ext_cost) cost_dols
from sales a, key_segment_plns c, product p, rep_wrtr_dw_cust h
where a.doc_dt between :in_start_dt and :in_end_dt
and a.customer_oc = h.control_loc_id
and a.sold_to_customer_id = h.sold_to_cust_id
and a.ship_to_customer_id = h.ship_to_cust_id
and ((:in_dg_cd = 'B' and h.dealer_grower_cd in ('D','G')) or h.dealer_grower_cd = :in_dg_cd)
and a.product_id = p.product_id
and p.product_gl_class_cd = 'CHEM'
and p.product_legal_name = c.product_legal_name
and c.key_segment in ('GLYPHOSATE','PLANT HEALTH/RUST FUNGICIDES','PYRETHROIDS','STROBI FUNGICIDES')--&IN_KEY_SEGMENTS
-- and (:in_oc = 'ALL' or (a.control_loc_id in (select control_loc from control_loc_comb_ocs where control_loc_comb = :in_oc)))
-- SALES DATA FILTERS TO MATCH ACCUM_SALES_DG_MV
and a.sale_type_cd in ('02','08')
and a.document_type_cd in ('I','C','D')
and (substr(a.product_id,-1) in ('0','1') OR nvl(upper(trim(p.product_brand)),'X') = 'TECH FEE')
and a.units <> 0
and a.unit_cost <> 0
and a.unit_price <> 0
-- NEW FILTERS ADDED 9/11/07: LOCATION(BRANCH), BUSINESS TYPE, RSM/ASM/REP
and ((:in_loc = 'ALL') or (nvl(a.warehouse_id,'<blank>') in (SELECT param_value
FROM report_param
WHERE report_id = :IN_REPORT_ID
AND session_id= :IN_SESSION_ID
AND USER_ID = :IN_USER_ID
AND param_name='LOCATION_TYPE')))
and ((:in_uhs_ag = 'ALL') or (:in_uhs_ag = 'NA' and p.product_uhs_ag != 'A') or (p.product_uhs_ag = :in_uhs_ag))
and ((:in_sales_rep = 'ALL') or (nvl(a.territory_id,'<blank>') in (SELECT param_value
FROM report_param
WHERE report_id = :IN_REPORT_ID
AND session_id= :IN_SESSION_ID
AND USER_ID = :IN_USER_ID
AND param_name='SALES_REP_TYPE')))
and EXISTS
(SELECT '1'
FROM locations l, report_param rp
WHERE rp.report_id = :IN_REPORT_ID
AND rp.session_id= :IN_SESSION_ID
AND rp.user_id = :IN_USER_ID
AND rp.param_value = l.region
AND rp.param_name = 'REGION_TYPE'
AND a.warehouse_id = L.ARS_LOCATION)
and EXISTS
(SELECT '1'
FROM locations l, report_param rp
WHERE rp.report_id = :IN_REPORT_ID
AND rp.session_id= :IN_SESSION_ID
AND rp.user_id = :IN_USER_ID
AND rp.param_value = l.region
AND rp.param_name = 'DIVISION_TYPE'
AND a.warehouse_id = L.ARS_LOCATION)
group by c.key_segment, P.supplier_id,
decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>'))Hi,
I need your help to create a report using Ref-Cursor. please see the below thread
Report using ref cursor or dynamic Sql -
Ref Cursor closed returning to Form
Hi,
I came across this old thread which seems to be an exact match for my problem.
sys ref cursor is closed
And whereas the solutions do work as stated there is an issue with it that i wonder if anyone here has since got around.
Take those examples and make the sql dynamic. on return to the form the ref cursor is instantaneouly closed for you making the thing unusable.
i.e.
OPEN cur FOR SELECT 'x' from dual
works just fine but
OPEN cur FOR 'SELECT ''X'' from dual'
resutls in an closed cursor the moment the ref cursor parameter returns to the form. I need the dynamic form because my cursor is truly built dynamically.
Any ideas anyone?Hi,
try this :
1. declare in the package specification
TYPE rec_view IS RECORD(
COL1 VARCHAR2(250),
COL2 VARCHAR2(250),
COL3 VARCHAR2(250),
COL4 VARCHAR2(250),
COL5 VARCHAR2(250)
TYPE t_ref_curs IS REF CURSOR RETURN rec_view;
TYPE t_rec_c IS REF CURSOR;
2. define the dynamic sql - procedure
PROCEDURE prc_getdata (p_refcur IN OUT t_ref_curs, p_result OUT VARCHAR2,
p_filter IN varchar2 DEFAULT NULL, p_orderby In VARCHAR2 DEFAULT NULL) IS
BEGIN
-- dyn cursor ! --
EXECUTE IMMEDIATE
'BEGIN
OPEN :a FOR ' ||
' select empno, ename, job, mgr, hiredate, sal from emp'||' '||
p_filter ||' '||
p_orderby ||'; '||
'END;'
USING p_refcur;
END prc_getdata;
3. define in the Form a PL/SQL based block on this procedure.
Hope it helps.
Best regards
Friedhold -
Problem installing Oracle forms and report in windows 7
I have a problem while installing Oracle forms and reports in windows 7 64 bit
The error is : [as] [ERROR] [] [oracle.as.provisioning] [tid: 20] [ecid: 0000IY5_e_EApIRMyYAhMG1BuDGr00000B,0] [[
oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:688)
at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:393)
at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:83)
at java.lang.Thread.run(Thread.java:619)
So I Google for it and found that this is version mismatch (May be I am wrong) and it tells that I have to install WLS - 10.3.2 with ofm_pfrd_win_11.1.1.2.0_64 (1 to 4)
But I am unable to get wls version 10.3.2.
For better understanding I am listing my installers :
(I) Windows 7 Ultimate 64 Bit
(II) (Oracle 11g) win64_11gR2_database (1 & 2)
(III) ofm_pfrd_win_11.1.1.2.0_64 (1 to 4)
(IV)wls1033_generic.jar , wls1033p_generic.jar , wls1035_generic.jar
(V)accessbridge-2_0_2-fcs-bin-b06
(VI)ofm_rcu_win32_11.1.1.2.1_disk1_1of1,ofm_rcu_win_11.1.1.3.1_disk1_1of1
(VII) ofm_wc_generic_11.1.1.5.0_disk1_1of1
(VIII)jdk-6u38-nb-7_2_1-windows-i586-ml , jdk-6u38-windows-x64
(IX) oepe-wls-indigo-installer-11.1.1.8.0.201110211138-10.3.6-win32
(X)wls1033_oepe111150_win32.exe
(XI)wls1035_win32.exe
(XII)wls1035_oepe111172_win64
(XIII)oepe-indigo-installer-12.1.1.0.1.201203120349-12.1.1-win64
After the installation while configure the forms reports, I am stuck while creating domain.
steps I follow is :
(i) Install Windows 7 Ultimate 64 Bit
(ii) (Oracle 11g) win64_11gR2_database (1 & 2)
(iii) wls1033_generic.jar
(iv) accessbridge-2_0_2-fcs-bin-b06
(v)ofm_rcu_win32_11.1.1.2.1_disk1_1of1
(vi) ofm_pfrd_win_11.1.1.2.0_64 (1 to 4)
Please any body help, for the installation of oracle forms and reports.
I have a formatted Windows 7 Ultimate
Where I have installed Adobe Acrobat Reader
IIS server from windows installer
Now I want to know the exact procedure so that i can run the forms and report in my machine.
This is my first installation of Oracle forms & Reports, so please do not pre assume about my understanding (Like "to install this he surely did this environment settings" )
Please specify all the steps
Furthermore if Another software I have to download then please tell me.
And I will be grateful if you specify the mistakes in my side.
Looking forward with anticipation.Solved, Thank you
-
Creating timer problem in oracle forms
Hello,
I am using oracle weblogic 10.3.5 with oracle forms 11g at windows 7.I am trying to make a trigger but getting frm 40738 argument 1 to builtin GET_APPLICATION_PROPERTY cant be null error. I am using code at when-new-form-Instance trigger:
declare
timer_id TIMER;
one_second number:=1000;
st varchar2(100);
begin
timer_id :=find_timer('CLOCK_TIMER');
If not id_null(timer_id) then
delete_timer('timer_id');
else
timer_id := CREATE_TIMER('CLOCK_TIMER',one_second,REPEAT);
--timer_id:=create_timer('CLOCK_TIMER',one_second,repeat);
st:=Get_application_property(TIMER_NAME);
message(st);
end if;
select to_char(sysdate,'HH24:MI:SS') into :EVENTS.CURRENT_TIME from dual;
exception when others then
message(TO_CHAR(SQLCODE)||''||SQLERRM);
end;
and at When-Timer-Expired trigger:
declare
timer_name varchar2(30);
BEGIN
timer_name := GET_APPLICATION_PROPERTY(TIMER_NAME);
IF timer_name = 'CLOCK_TIMER' THEN
SELECT TO_CHAR(SYSDATE,'HH24:MI:SS')
INTO :EVENTS.CURRENT_TIME
FROM DUAL;
END IF;
EXCEPTION WHEN OTHERS THEN
MESSAGE(TO_CHAR(SQLCODE)||''||SQLERRM);
END;
Thank You
regards
aaditya.The problem is that you have a local variable with the same name as the CONSTANT "TIMER_NAME". Therefore, your call to GET_APPLICATION_NAME is passing the value of your Local Variable to the built-in instead of the value of the CONSTANT 'TIMER_NAME."
declare
timer_name varchar2(30);
BEGIN
timer_name := GET_APPLICATION_PROPERTY(TIMER_NAME);
IF timer_name = 'CLOCK_TIMER' THEN
Change your code so your variable TIMER_NAME is unique (different) from the constant TIMER_NAME variable. A common programming standard prefix your variable names with the data time. Following this concept, rename your variable to V_TIMER_NAME.
Craig... -
Field selection problem in Oracle Forms
I am using an application created in Oracle 6i Forms (patch 11).
Mouse navigation in the forms do not work properly.
Since a field is selected and some string is typed then first character is always ignored hence it is necessary to press a key like before typing required string.
I'm using Java VM 1.4.1 on client-side,
The same application works well when I'm using Oracle JInitiator.
does anybody know how to work around the problem ?
thanksHi, again and thanks for the patience. I am using the oracle plugin all the time and it works. But I need to use the application on different computer where the oracle JInitiator could not be installed. There I am trying to use the Sun Java Plugin Version 1.4.2_06 (build 1.4.2_06-b03) which shall be compatible. Since last time I asked again the provider and I found that the application is pure Oracle Forms 9i application which doesn't need Java when it is run on the computer where the application is instaled. The Java plugin is then used to show the forms and to provide the comunication between clients and application server. Probably it is clear to you however I am not a developer but poor user only. I have also tried to play with the application to find how it works (or doesn't works). It seems that the problem is exactly with mouse navigation. When tab or enter is used then it works fine. But when a form field is selected by mouse then a character is typed and i can see it. But when I continue with the writing the first character is overwrite. Sometimes when there is a list of records row by row and I try to get to next row using the mouse the application tells me that some bloody key is not valid but using the key down I can easily go ti next row. To tell the truth I don't like mouses at all so it is no problem to me but other users do not know how Tab works :-)
-
Strange Problem in Oracle Forms.
Hello,
I have a strange problem of a form not opening in the migrated App Server but is working fine in the existing server.
The problem is that we have now migrated to App Server 10.1.2.3.0 (patch applied to 10gR2 App Server installation) from 9.2.0.4.
The issue is that the same form works perfectly fine in 9.2.0.4 but doesnt open up in the 10.1.2.3.0 server itself !
The form is called using "new_form" procedure.
I even cross checked by giving other form names; they work fine. But this set of forms (for which problem occurs) only doesnt open up.
All the forms are compiled against 10.1.2.3 Compiler; All point to the same OLB and all of them have a common menu bar.
Peculiar thing is WEBUTIL is working for all forms. Version is 1.0.6. No problems in WebUtil.
Please help me making this sole out as we need to migrate this ASAP.
Requesting one and all.
Thanks.Solved it out..
It was an error in frmwebutil.jar installation.
Below is the link from Metalink:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=421930.1
Cheers ! -
Case statement problems in oracle forms 6i
Hello,
Any one can help me that how to use case statment in Oracle forms 6i.
i have read one thread and there was no proper solution so could any one please let me know to use case statement.
Please also let me know which category i should search for FORMS 6i.
when i'm using below code with cursor then i'm getting error 103
database:=11g
application := forms 6i
operating system:= win Xp
code is given below :-
cursor c1 is
select nc.nomenclature_id,
nvl(nc.category_value, 0) master,
nvl(nc2.category_value, 0) case,
nvl(nc3.category_value, 0) bundle,
case
when nvl(nc.category_value, 0) > 0 and
nvl(nc2.category_value, 0) > 0 and
nvl(nc3.category_value, 0) > 0 then
'A' --All packouts Master, Case, Bundle
when nvl(nc.category_value, 0) > 0 and
nvl(nc2.category_value, 0) > 0 and
nvl(nc3.category_value, 0) = 0 then
'B' --Both Master and Case
when nvl(nc2.category_value, 0) = 0 and
nvl(nc3.category_value, 0) = 0 then
'C' --Master Case Only
else
'N'
end code
from nomn_category nc, --master case
(select nc2.nomenclature_id,
nc2.category_value
from nomn_category nc2
where nc2.category_id = '230732') nc2,
(select nc3.nomenclature_id,
nc3.category_value
from nomn_category nc3
where nc3.category_id = '236566') nc3
Edited by: Rahul on Feb 3, 2012 7:18 PM
Edited by: Rahul on Feb 3, 2012 7:20 PMhello Andreas,
It is ok but i dont have to use view there.
i need to use without view, because this code has to be use in FORMS6i.
But Forms6i doesn't support to case function. i'm newbie in Forms.
If you can convert to below bold one portion(case) into decode then please help me or
if you have any idea about Forms6i then please send me any link where is given explanation about excel report that how to make excel report through Forms6i step by step and that excel report should be generate on any dynamic path which is given by user:-
cursor c1 is
select nc.nomenclature_id,
nvl(nc.category_value, 0) master,
nvl(nc2.category_value, 0) case,
nvl(nc3.category_value, 0) bundle,
case
when nvl(nc.category_value, 0) > 0 and
nvl(nc2.category_value, 0) > 0 and
nvl(nc3.category_value, 0) > 0 then
*'A'*
when nvl(nc.category_value, 0) > 0 and
nvl(nc2.category_value, 0) > 0 and
nvl(nc3.category_value, 0) = 0 then
*'B' --Both Master and Case*
when nvl(nc2.category_value, 0) = 0 and
nvl(nc3.category_value, 0) = 0 then
*'C'*
else
*'N'*
end "code"
from nomn_category nc,
(select nc2.nomenclature_id,
nc2.category_value
from nomn_category nc2
where nc2.category_id = '230732') nc2,
(select nc3.nomenclature_id,
nc3.category_value
from nomn_category nc3
where nc3.category_id = '236566') nc3
thanks
Maybe you are looking for
-
(Solved) one sound application at a time
hello,archers! I moved from gnome to Kde(at last) and faced the issue. E.G if amarok plays musik there's no system notifications and smplayer plays no sound t.i only one programm can use alsa at a time. I have latest kde, alsa and gstreamer and xine
-
OC4J EJBQL and EJB 2.0 features
Hello Debu Panda and All I've got all howtos and I mangaged to get some parts of OC4J [Oracle9iAS (9.0.3.0.0) Containers for J2EE (build 020323.1689)] working. There are still some issues that are stalling our development. Could you please comment on
-
CADO Report - Missing Project Definition and WBS elements
While running CADO (time sheet data) report for employee, data is not being pulled up for the WBS Element and Project Definition. What could be the reason? Here time is entered against a network activity but for some entries WBS element and project d
-
Sql Server connection - missing / invalid key information for tables
Not sure if this is a known issue (couldn't see one) or simply poor JDBC behaviour ... I'm connected to a Sql Server 2000something instance and I see the Users, and I see the Tables and Columns for the user of interest. BUT for Keys for each table, I
-
TS3694 i have an error 3014 on my iphone how do i fix this error
i have an error 3014 on my i phone 4s, how do i fix this?