REF CUR within FUNC

I'm trying to check if rows exist on table_a - I'm using ref curs b/c need for dynamic FROM clause - getting message : PLS-00455: cursor 'L_REF_CUR' cannot be used in dynamic SQL OPEN statement
vers 8.1.7.2.0
Thanks for help.
CREATE OR REPLACE FUNCTION func_summ_verify
(ais_table IN varchar2,
ais_rept_date IN date,
ais_app_code in varchar2)
RETURN VARCHAR2
IS
ln_err_num app_errors.err_num%TYPE ;
ls_err_msg app_errors.err_msg%TYPE ;
ls_app_id app_errors.app_id%TYPE ;
ls_app_msg app_errors.app_msg%TYPE ;
ls_sql long ;
ln_row_count number := 0 ;
ln_return number ;
TYPE ref_cur IS REF CURSOR RETURN table_a%ROWTYPE ;
l_ref_cur ref_cur ;
l_ref_cur_row table_a%ROWTYPE ;
BEGIN
ls_app_id := 'func_summ_verify.fun' ;
ls_app_msg := 'Determine if rows exist on sum tbl' ;
ls_sql := ' select *'||
' from '||ais_table|| /*in as table_a*/
' where application_cd = '||''''||ais_app_code||''''||
' and '||
' report_date = '||''''||ais_rept_date||''''||
' and rownum < 10 ' ;
OPEN l_ref_cur FOR ls_sql ;
FETCH l_ref_cur INTO l_ref_cur_row ;
ln_row_count := SQL%ROWCOUNT ;
sp_putline(ls_sql,ln_return) ;
sp_putline('sql%rowcount: '||ln_row_count,ln_return) ;
CLOSE l_ref_cur ;
IF ln_row_count > 0 THEN
RETURN 'T' ;
ELSE
RETURN 'F' ;
END IF ;
EXCEPTION

Brian:
If all you are trying to do is to see if at least one row exists for the set of criteria, you do not need a REF CURSOR at all. You can construct the sql statement then use EXECUTE IMMEDIATE to run it, and trap for NO_DATA_FOUND.
I would write your function like this:
CREATE OR REPLACE FUNCTION func_summ_verify     (ais_table IN VARCHAR2,
                                              ais_rept_date IN DATE,
                                              ais_app_code in VARCHAR2)
          RETURN VARCHAR2 IS
ln_return number;
BEGIN
     ls_app_id := 'func_summ_verify.fun' ;
     ls_app_msg := 'Determine if rows exist on sum tbl' ;
     ls_sql := 'SELECT 1 FROM '||ais_table|| /*in as table_a*/
                     ' WHERE application_cd = :appcd and
                     report_date = :rptdt and
                     rownum = 1';
     EXECUTE IMMEDIATE ls_sql INTO ln_return USING ais_app_code, ais_rept_date;
     RETURN 'T' ;
EXCEPTION WHEN NO_DATA_FOUND THEN
   RETURN 'F';
END;Happy Surfing
John

Similar Messages

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • Q: NULL return REF CURSOR from a PL/SQL function

    I was told that PL/SQL does not handle properly NULL REF CURSORS.
    Here's my implementation in a PL/SQL package
    PACKAGE SPEC:
    TYPE z_rec IS RECORD (
    TYPE z_cur IS REF CUR RETURN z_rec;
    FUNCTION some_function(
    p_msg OUT VARCHAR2)
    RETURN z_cur;
    PACKAGE BODY:
    FUNCTION some_function(
    p_msg OUT VARCHAR2)
    RETURN z_cur
    IS
    retval z_cur;
    OPEN retval FOR
    SELECT ...
    -- Successfull data retrieval
    p_msg := NULL;
    RETURN retval;
    EXCEPTION
    WHEN OTHERS THEN
    p_msg := SUBSTR( SQLERRM, 1, 255 );
    RETURN NULL;
    END some_function;
    I am expecting that a user of this function would call it and test p_msg (output parameter)
    1. IS NULL p_msg it means there were no errors encounetered. The returned cursor can be NULL though (i.e. no records retrieved)
    2. IS NOT NULL p_msg, it means that there were errors and the returned cursor is not usable.
    My question is:
    what are the pitfalls of this approach?
    Thanks a lot.

    user10817976 wrote:
    I asked and still waiting for the answer.
    retval z_cur;
    What I am afraid for is that
    OPEN retval FOR
    SELECT ...
    EXCEPTION
    retval := NULL;
    tries to open the cursor. What happens in case of error? Well, I imagine retval is still NULL. Do I need to (try) to close the cursor in the EXCEPTION section (in order not to misuse the number of cursors in the pool?) That's my worry.No.
    If there is an error opening the cursor the cursor will not be open and will not need closing.
    The code should simply be
    function some_function
        return z_cur
    is
        retval z_cur;
    begin
        open retval for
            select ...
        return retval;
    end some_function;        It is bad practice for a function to have output parameters.
    It is bad practice to turn exceptions into return codes.
    http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html
    Remember everyone, everyone remember, keep in mind:
    When others not followed by RAISE or RAISE_APPLICATION_ERROR is almost certainly, with 99.999999999% degree of accuracy, a bug in your developed code. Just say "no" to when others not followed by raise or raise_application_error!Read the links, it leads to problems over and over again.

  • Adding ability to use ref cursors in future versions of Apex

    Currently it has been documented that Apex does not play well with ref cursors and how to get around that. Is this a feature that the Apex team is looking into for future versions? Currently we are using Oracle 11g and 1 g with Apex 4.0.2. Your reply is most appreciated.
    JudJasRis

    Hi Tony Miller,
    Thank you for the prompt reply. I see your name in many of the replies in this Apex forum.
    We currently have several package functions that use out ref cursors. We are looking to use the result of that ref cursor for our reports. We have found a way to get around the ref cursor by creating a table collection of the row type and return it in a specific function declaration in a pipelined function. I am fairly new to creating pkgs, functions and specifically pipeline functions as well as learning the many nooks and crannies of Apex. It would be nice to be able to call a predefined ref cursor within Apex. I was just curious if that was a feature that could be developed. Please excuse my lack of knowledge, I am learning though by asking these type of questions.
    Again thank you.
    JudJasRis

  • Object refs

    Hi
    RDBMS: 8.1.5
    platform: Tru64
    i would like to "load" a relational data modell into a object-structure in PL/SQL.
    my problem is:
    the data modell has a detail and the detail has details too.
    As I know, there is no way to have nested tables within nested tables, but I can make ref's to nested tables.
    How can I "fill" my PL/SQL - Structure (using object types, but no object tables or object views) with data?
    I didn't find a way to get the REF's within PL/SQL.
    null

    Hi Warren,
    A bug in SQL Developer perhaps? With the following test case:
    create type ADDRESS as object
       (street_name     VARCHAR2(15),
        house_no        NUMBER,
        prior_address REF ADDRESS)
    create table addresses of address
    insert into addresses values (address('Darley Drive', 190, null));
    commit;
    insert into addresses
      select address('Charles Court', 122, Ref(e))
         from addresses e
         where e.street_name = 'Darley Drive'
           and e.house_no = 190;
    commit;
    select * from addresses;produces this output:
    TYPE ADDRESS compiled
    table ADDRESSES created.
    1 rows inserted.
    commited.
    1 rows inserted.
    commited.
    STREET_NAME             HOUSE_NO PRIOR_ADDRESS                              
    Darley Drive                 190                                      
    Charles Court                122 I will log an internal bug for it.
    Regards,
    Gary Graham
    SQL Developer Team

  • How to eliminate date and time in image logging in vision express

    I am using vision express to capture a set number of images with inline processing. I am opting to log the images to a specified folder. However, the file names of the images have the date and time appended by default. Is there a way to eliminate the date and time in the images' file name? Please help.
    Solved!
    Go to Solution.

    Hi
    It may help if you paste your code and file to better understand what is it that you want to remove from the file. If you have the vision development module, you can certainly use the File VIs available within the vision tools utilities palette in LabVIEW to manipulate the way you save your files.
     http://www.ni.com/pdf/manuals/371007a.pdf (Page14)
     There is a good example code you can refer to within the following forum link:
    http://forums.ni.com/t5/LabVIEW/Labview-IMAQ-VI-for-capturing-images-and-saving-with-incremental/td-... 
    Also if you have access to the Vision Builder for Automated Inspection software, this application offers you that option:
    http://digital.ni.com/public.nsf/allkb/AE578D1C036084C0C1256EB4005EE687?OpenDocument
    Luis S
    Application Engineer
    National Instruments

  • Count of columns in a query

    All,
    Could anyone please clarify me on , how we can count the column's which were used in a query.
    Ex:    SELECT ENAME, EMPNO, SAL , JOB FROM EMP; 
    --Here in the above query, I have taken 4 columns(counted manually) . Instead of counting it manually is there any other way.
    Thanks

    It sounds like you're creating dynamic SQL.  Why are you doing that?  Dynamic SQL's would seem to indicate you don't know the structure of your own database or that your application design is trying to be generic rather than being designed in proper modularized units (1 unit does 1 task, not multiple generic tasks).  99.999% of the time, people using dynamic SQL indicates that they are misusing the database or haven't designed things properly.
    If there's really a valid reason for using dynamic SQL, then of course you can do it properly and use all the features of Oracle to get information about the dynamic SQL, but that means not using something as poor as EXECUTE IMMEDIATE (which is often abused by most people), or trying to use ref cursors within PL/SQL (which are more intended for 3rd party application layers).  The power of dynamic SQL is gained from using the DBMS_SQL package... as in the following simplistic example...
    SQL> set serverout on
    SQL> create or replace procedure run_query(p_sql IN VARCHAR2) is
      2    v_v_val     varchar2(4000);
      3    v_n_val     number;
      4    v_d_val     date;
      5    v_ret       number;
      6    c           number;
      7    d           number;
      8    col_cnt     integer;
      9    f           boolean;
    10    rec_tab     dbms_sql.desc_tab;
    11    col_num     number;
    12    v_rowcount  number := 0;
    13  begin
    14    -- create a cursor
    15    c := dbms_sql.open_cursor;
    16    -- parse the SQL statement into the cursor
    17    dbms_sql.parse(c, p_sql, dbms_sql.native);
    18    -- execute the cursor
    19    d := dbms_sql.execute(c);
    20    --
    21    -- Describe the columns returned by the SQL statement
    22    dbms_sql.describe_columns(c, col_cnt, rec_tab);
    23    --
    24    -- Bind local return variables to the various columns based on their types
    25
    26    dbms_output.put_line('Number of columns in query : '||col_cnt);
    27    for j in 1..col_cnt
    28    loop
    29      case rec_tab(j).col_type
    30        when 1 then dbms_sql.define_column(c,j,v_v_val,2000); -- Varchar2
    31        when 2 then dbms_sql.define_column(c,j,v_n_val);      -- Number
    32        when 12 then dbms_sql.define_column(c,j,v_d_val);     -- Date
    33      else
    34        dbms_sql.define_column(c,j,v_v_val,2000);  -- Any other type return as varchar2
    35      end case;
    36    end loop;
    37    --
    38    -- Display what columns are being returned...
    39    dbms_output.put_line('-- Columns --');
    40    for j in 1..col_cnt
    41    loop
    42      dbms_output.put_line(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
    43                                                                                when 2 then 'NUMBER'
    44                                                                                when 12 then 'DATE'
    45                                                       else 'Other' end);
    46    end loop;
    47    dbms_output.put_line('-------------');
    48    --
    49    -- This part outputs the DATA
    50    loop
    51      -- Fetch a row of data through the cursor
    52      v_ret := dbms_sql.fetch_rows(c);
    53      -- Exit when no more rows
    54      exit when v_ret = 0;
    55      v_rowcount := v_rowcount + 1;
    56      dbms_output.put_line('Row: '||v_rowcount);
    57      dbms_output.put_line('--------------');
    58      -- Fetch the value of each column from the row
    59      for j in 1..col_cnt
    60      loop
    61        -- Fetch each column into the correct data type based on the description of the column
    62        case rec_tab(j).col_type
    63          when 1  then dbms_sql.column_value(c,j,v_v_val);
    64                       dbms_output.put_line(rec_tab(j).col_name||' : '||v_v_val);
    65          when 2  then dbms_sql.column_value(c,j,v_n_val);
    66                       dbms_output.put_line(rec_tab(j).col_name||' : '||v_n_val);
    67          when 12 then dbms_sql.column_value(c,j,v_d_val);
    68                       dbms_output.put_line(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
    69        else
    70          dbms_sql.column_value(c,j,v_v_val);
    71          dbms_output.put_line(rec_tab(j).col_name||' : '||v_v_val);
    72        end case;
    73      end loop;
    74      dbms_output.put_line('--------------');
    75    end loop;
    76    --
    77    -- Close the cursor now we have finished with it
    78    dbms_sql.close_cursor(c);
    79  END;
    80  /
    Procedure created.
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    Number of columns in query : 4
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    PL/SQL procedure successfully completed.
    SQL>

  • URGENT: Date format in Reports Giving me trouble...plz help me out

    Hi guru's Can any one help me out
    I
    n the front end apps we are getting the date value as
    BOM_SRS_DATETIME_STANDARD
    Where we are entering the date value as MM/DD/RRRR HH24:MI:SS
    The date format set in the company is like RRRR/MM/DD HH24:MI:SS
    SO I format masked the date parameter in .RDF to RRRR/MM/DD HH24:MI:SS format.
    While the actual date format in the data base is like DD/MM/RRRR HH24:MI:SS.
    I checked all the old reports and the date format is like they masked the date format to company format and used the afterparameter trigger like bellow:
    if :P_SENT_DATE_FROM is not null and :P_SENT_DATE_TO is null then
    :P_SENT_DATE_TO := :P_SENT_DATE_FROM;
    end if;
    if (:P_SENT_DATE_FROM = :P_SENT_DATE_TO) and (:P_SENT_DATE_FROM is not null) then
    :WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE = '||' to_date('''||:P_SENT_DATE_FROM||''''||','||'''DD-MON-RR'')';
    else
    if :P_SENT_DATE_FROM is not null then
    :WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE >= '||' to_date('''||:P_SENT_DATE_FROM ||''''||','||'''DD-MON-RR'')';
    end if;
    if :P_SENT_DATE_TO is not null then
    :WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE <= '||' to_date('''||:P_SENT_DATE_TO ||''''||','||'''DD-MON-RR'')';
    end if;
    end if;
    I tried this but i couldnt get the output either.
    I am pretty much confused.
    Plz help me out...

    If you want to use a dynamic where caluse in your report query you can use a Reference Cursor using REF CUR QUERY tool in your report like this :
    function QR_1RefCurDS return DEF_CURSORS.CHARACT_REFCUR is
    temp_CHARACT DEF_CURSORS.CHARACT_refcur;
    begin
    IF :FROM_NO IS NULL AND :TO_NO IS NULL THEN
    open temp_CHARACT for SELECT ACCT_CODE, ACCT_NAME
    FROM CHARACT
    ORDER BY ACCT_CODE;     
    ELSIF :TO_NO IS NULL AND :FROM_NO IS NOT NULL THEN
    open temp_CHARACT for select ACCT_CODE, ACCT_NAME
    FROM CHARACT
    WHERE ACCT_CODE=:FROM_NO
    ORDER BY ACCT_CODE;     
    ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NOT NULL THEN
    open temp_CHARACT for select ACCT_CODE, ACCT_NAME
    FROM CHARACT
    WHERE ACCT_CODE BETWEEN :FROM_NO AND :TO_NO
    ORDER BY ACCT_CODE;               
    ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NULL THEN
    open temp_CHARACT for select ACCT_CODE, ACCT_NAME
    FROM CHARACT
    WHERE ACCT_CODE<=:TO_NO
    ORDER BY ACCT_CODE;     
    END IF;
    return temp_CHARACT;
    end;
    But first you have to declare a cursor type in a package

  • Cant call localejbbean from jsp

    hi all,
    i try to call my LocalEjbBean from Jsp file , but i got this exception
    this is my jsp file
    <%
    com.dcons.iss.HelloLocalHome home =null;
    com.dcons.iss.HelloLocal hello=null;
    Context ctx = new InitialContext();
    Object obj=ctx.lookup("HelloLocalBean");
    home = (com.dcons.iss.HelloLocalHome)obj;
    hello = home.create();
    hello.display();
    %>
    this is my ejb-jar xml
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>Hello</ejb-name>
    <local-home>com.dcons.iss.HelloLocalHome</local-home>
    <local>com.dcons.iss.HelloLocal</local>
    <ejb-class>com.dcons.iss.HelloLocalBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <ejb-ref-name>HelloLocalBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>HelloLocal</local-home>
    <local>HelloLocalHome</local>
    <ejb-link>HelloLocalBean</ejb-link>
    </ejb-local-ref>
    </session>
    </enterprise-beans>
    </ejb-jar>
    this is my weblogic -ejb-jar.xml
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Hello</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>HelloLocalBean</ejb-ref-name>
    <jndi-name>HelloLocalBean</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>HelloLocalBean</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    Exception is
    <May 17, 2004 12:53:00 PM GMT+05:30> <Error> <HTTP> <BEA-101017> <[ServletContex
    t(id=14238425,name=TestServerPro,context-path=/TestServerPro)] Root cause of Ser
    vletException.
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundExcept
    ion: While trying to look up /app/ejb/LocalEJBProject.jar#Hello/local-home in /a
    pp/webapp/TestServerPro/26623105.; remaining name '/app/ejb/LocalEJBProject/jar#
    Hello/local-home'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
    NamingNode.java:858)
    at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNaming
    Node.java:150)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
    ava:237)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:336)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyCo
    ntextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.j
    ava:130)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingMana
    ger.java:96)
    at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNod
    e.java:265)
    at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.
    java:732)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:19
    1)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
    ava:237)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:336)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at jsp_servlet.__index._jspService(index.jsp:20)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter(PageFlowJspFilt
    er.java:208)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:27)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:305)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(Page
    FlowRequestProcessor.java:1304)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedire
    ctor.forward(PageFlowRequestProcessor.java:1320)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlo
    wRequestProcessor.java:1200)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processForwardCon
    fig(PageFlowRequestProcessor.java:1094)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:279)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowR
    equestProcessor.java:651)
    at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegi
    sterActionServlet.java:527)
    at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActi
    onServlet.java:152)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:307)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(Page
    FlowRequestProcessor.java:1304)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedire
    ctor.forward(PageFlowRequestProcessor.java:1320)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlo
    wRequestProcessor.java:1200)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowR
    equestProcessor.java:638)
    at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegi
    sterActionServlet.java:527)
    at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActi
    onServlet.java:152)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6354)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: While trying to look up /app/ejb/LocalEJBProject.jar#Hello/local-home in /app/webapp/TestServerPro/26623105.; remaining name '/app/ejb/LocalEJBProject/jar#Hello/local-home'
    plz help me to solve this problem

    Hi,
    The portable way to lookup any resources within a J2EE component is to the private component namespace located under java:comp/env. Even though some products allow you to do a "global" lookup, that's not the preferred approach since it's not portable. Your deployment descriptors need to be changed since you need to define the ejb-local-ref within the descriptor of the client component, which in this case is the jsp. So, you would need to define the ejb-local-ref within the web.xml associated with the jsp. The ejb-ref-name within the ejb-local-ref should be appended to the java:comp/env lookup in your code. So, for your example, the jsp would ctx.lookup("java:comp/env/HelloLocalBean")
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Returning multiple pl/sql tables to VB using ADO + Oracle's OLE DB

    Windows XP
    VB 6
    ADO 2.7
    Oracle 9i Client (OLE DB 9.2.0.1)
    Oracle DB 8.1.7.2
    I have just upgraded a VB5/NT (RDO + MS ODBC for Oracle) app to VB6/XP (ADO + Oracle's OLE DB). The calls to stored procedures that returns tables are not working now. I get following error:
    -214721900 ORA-06550: line 1, column 42:
    PLS-00201:identifier 'LO_AUDIT_ID_TBL' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please provide hint/help.

    Yes, the LO_AUDIT_ID_TBL is a variable (of table type) being returned from the stored procedure.
    I tried changing case of table is in pl/sql.
    I tried removing the table(s) from the Call statement...
    and I get error message that there are missing parameters.
    THANKS SO MUCH FOR YOUR HELP.
    I have been reading OLE DB User's guide in which there are examples of Ref Cursors and has no documentation regarding how to achieve same using tables (in stead of Ref Curs). I am also looking for documentation that would describe all different Registry attributes that could be turned on or off to do things, but have not been able to find any.
    I am trying to use the PLSQLRSet to retrieve rowsets from pl/sql tables. You can see that in my VB code below, in GetSPResultSet function.
    The VB Code is:
    Public Function Retrieve() As ADODB.Recordset
    Dim inparam(-2 To -1) As Variant 'set to be ignored by GetSPResultSet method
    Dim outparam(0) As Variant
    Dim strSQL As String
    strSQL = "{ CALL PckPLAudit.Sel_Smmry( ?,{resultset 1000, lo_audit_id_tbl, lo_audit_dt_tbl, lo_audit_type_tbl, " & _
    "lo_audit_status_tbl, lo_qty_selected_tbl, lo_qty_deselect_tbl, lo_qty_sent_tbl, lo_qty_follow_tbl, " & _
    "lo_qty_received_tbl, lo_qty_ncpl_tbl, lo_qty_security_tbl, lo_qty_closed_tbl, lo_qty_sentsec_tbl}, {resultset 1, lo_res_tbl} ) }"
    Set rdoRs = mConnection.GetSPResultSet(strSQL, inparam(), outparam())
    BuildCollection
    Set Retrieve = rdoRs
    End Function
    Public Function GetSPResultSet(ByVal szSQL As String, InParam() As Variant, OutParam() As Variant) As ADODB.Recordset
    '============================================================================
    'submits a call to a stored procedure that returns table output parameters.
    'out params are interpreted as ADODB.Recordset
    'szSQL : SQL call to stored procedure
    'InParam() : array of input parameter values
    'OutParam() : array of output parameter values set in this function
    '============================================================================
    Dim qry As New ADODB.Command
    Dim ParamIn As ADODB.Parameter
    Dim ParamOut As ADODB.Parameter
    Dim RS As ADODB.Recordset
    Dim inti As Integer
    Dim intj As Integer
    Dim blnret As Boolean
    Dim mErrors As New cErrors
    Dim retVal As Double
    'Dim itmp As Integer
    Dim ParmType As DataTypeEnum
    Dim i
    On Error GoTo errGetSPResultSet
    blnret = True
    Set qry = New ADODB.Command
    qry.ActiveConnection = mrdoCn
    qry.CommandType = adCmdText
    qry.CommandText = szSQL
    'load rdoParameter object(s) from InParam array if InParam exists
    For inti = 0 To UBound(InParam)
    'qry.Parameters(i).Value = InParam(inti)
    Set ParamIn = New ADODB.Parameter
    Select Case TypeName(InParam(inti))
    Case "Integer"
    ParmType = adDouble
    Case "Double"
    ParmType = adDouble
    Case "String"
    ParmType = adChar
    Case "Null"
    ParmType = adDouble
    Case "Date"
    ParmType = adDate
    Case "Long"
    ParmType = adDouble 'jks 12/19/2002
    End Select
    Set ParamIn = qry.CreateParameter(ParamIn, ParmType, adParamInput)
    ParamIn.Value = InParam(inti)
    If TypeName(InParam(inti)) = "Null" Then
    ParamIn.Size = 0
    Else
    ParamIn.Size = Len(InParam(inti))
    End If
    qry.Parameters.Append ParamIn
    Next
    For intj = 0 To UBound(OutParam)
    Set ParamOut = New ADODB.Parameter
    Select Case TypeName(OutParam(intj))
    Case "Integer"
    ParmType = adDouble
    Case "Double"
    ParmType = adDouble
    Case "String"
    ParmType = adChar
    Case "Null"
    ParmType = adEmpty
    Case "Empty"
    ParmType = adDouble
    Case "Date"
    ParmType = adDate
    Case "Long"
    ParmType = adDouble 'jks 12/19/2002
    End Select
    Set ParamOut = qry.CreateParameter(ParamOut, ParmType, adParamOutput, 255)
    qry.Parameters.Append ParamOut
    Next
    'execute the stored procedure call
    qry.Properties("PLSQLRSet") = True
    Set RS = qry.Execute() 'rdOpenStatic, rdConcurReadOnly
    qry.Properties("PLSQLRSet") = False'
    For intj = 0 To UBound(OutParam)
    OutParam(intj) = qry.Parameters.Item(inti)
    inti = inti + 1
    Next
    If OutParam(0) <> 0 Then
    If OutParam(0) = 999 Then
    i = mErrors.DisplayError(Val(OutParam(0)), "SAM")
    Else
    MsgBox "Database returned error code " & OutParam(0) & "." & vbCrLf & " Unable to complete operation. "
    End If
    blnret = False
    End If
    If blnret Then
    Set GetSPResultSet = RS
    Else
    Set GetSPResultSet = Nothing
    End If
    Set RS = Nothing
    Set qry = Nothing
    Set ParamIn = Nothing
    Set ParamOut = Nothing
    exitGetSPResultSet:
    Exit Function
    errGetSPResultSet:
    blnret = ProcessError(Err)
    If Not blnret Then Set GetSPResultSet = Nothing
    Resume exitGetSPResultSet
    End Function
    The stored procedure is:
    CREATE OR REPLACE PACKAGE BODY D5750PGM.PckPLAudit IS
    PROCEDURE Sel_Smmry (
         lo_res_cd          out     number,
         LO_AUDIT_ID_TBL          out     pckclaudit.audit_id_tbl%type,
         lo_audit_dt_tbl          out     pckclaudit.audit_dt_tbl%type,
    lo_audit_type_tbl     out     pckclaudit.audit_type_tbl%type,
         lo_audit_status_tbl     out     pckclaudit.audit_status_tbl%type,
         lo_qty_selected_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_deselect_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_sent_tbl          out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_follow_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_received_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_ncpl_tbl          out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_security_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_closed_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_sentsec_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_res_tbl          out     pcktbtable_type.res_tbl%type
    IS
    BEGIN
         PckAudit.Sel_Smmry (pckclglobal.lg_pl_proc, lo_res_cd,
         lo_audit_id_tbl,
         lo_audit_dt_tbl,
    lo_audit_type_tbl,
         lo_audit_status_tbl,
         lo_qty_selected_tbl,
         lo_qty_deselect_tbl,
         lo_qty_sent_tbl,
         lo_qty_follow_tbl,
         lo_qty_received_tbl,
         lo_qty_ncpl_tbl,
         lo_qty_security_tbl,
         lo_qty_closed_tbl,
         lo_qty_sentsec_tbl,
         lo_res_tbl
    END Sel_Smmry;
    END PckPLAudit;
    also, pckclaudit.audit_id_tbl%type is defined as
    TYPE audit_id_tbl_type IS TABLE OF disb_audit.disb_audit_id%TYPE
         INDEX BY BINARY_INTEGER ;
    and disb_audit.disb_audit_id%TYPE is defined as
    CREATE TABLE D5750.DISB_AUDIT
    DISB_AUDIT_ID NUMBER(9,0) NOT NULL,
    AUDIT_DT DATE NOT NULL,
    AUDIT_CODE_TYPE_ID VARCHAR2(5) NOT NULL,
    AUDIT_CODE_ID VARCHAR2(2) NOT NULL,
    CRTN_ID VARCHAR2(8) NOT NULL,
    CRTN_DT_TM DATE NOT NULL,
    etc.

  • Obtaining full call stack

    Hello, any one know of a utility that will output full call stack information from beginning of a program to end. here's an example output.
    MyObj::main()
    0 AnotherObj::callMe()
    0 1 AnotherObj::anotherFunc()
    0 1 2 AnotherObj::yetAnotherFunc()
    0 1 2 EXIT AnotherObj::yetAnotherFunc()
    0 1 EXIT AnotherObj::anotherFunc()
    0 EXIT AnotherObj::callMe()
    EXIT MyObj::main()

    Use aspectJ extension for java. Its a very good concept for addressing cross-cutting concerns in java design. Logging is a concern accross classes. You can centralize logging by using what are called "aspects".
    Its very much possible to obtain the entire call stack using this in the way u wanted.
    You can start looking at http://www.aspectj.org
    After you have understood what aspect-oriented programming is you can use the following aspect. You have to download aspectJ for using this.
    import java.io.*;
    import org.aspectj.lang.Signature;
    import org.aspectj.lang.reflect.SourceLocation;
    import org.aspectj.lang.JoinPoint;
    import java.util.LinkedList;
    import java.lang.reflect.Field;
    import java.lang.*;
    aspect func
    int nestlevel=0;
    Signature sig;
    SourceLocation sl;
    boolean in;
    StringBuffer strbf = new StringBuffer();
    LinkedList ll = new LinkedList();
    static PrintStream ps;
    static
         try
              ps = new PrintStream(new FileOutputStream(new File("Trace.txt")));
         catch(Exception ex)
              ex.printStackTrace();
              System.out.println("Could not create trace file.");
    pointcut functrack() : call(* *(..)) && !within(func) && !call(* java..*(..));
    before() : functrack()
    Object[] obj = thisJoinPoint.getArgs();
         doBeforeJob(thisJoinPoint, obj);
    after() returning(Object o) : functrack()
    doAfterJob(thisJoinPoint, o);
    String formatInputParameters(Object o[])
         StringBuffer temp = new StringBuffer();
    temp.append("(");
         if(o.length == 0)
         temp.append("");
         temp.append(")");
         return temp.toString();
    for(int i = 0; i < o.length; i++)
    if(i < (o.length-1))
    temp.append(o.toString() + ", ");
    else
    temp.append(o.toString());
    temp.append(")");
    return temp.toString();
    void doBeforeJob(JoinPoint tjp, Object [] obj)
    String s = new String(formatInputParameters(obj));
    ll.add(new Long(System.currentTimeMillis()));
    nestlevel++;
    captureValues(tjp);
    printValues(s);
    void captureValues(JoinPoint tjp)
    sig = tjp.getSignature();
    sl = tjp.getStaticPart().getSourceLocation();
    void printValues(String s)
    in = true;
    indent("[FI]Function Call: " + sig.getName() + s + "; Line " + sl.getLine() + " of File " + sl.getFileName() + ".");
    void indent(String s)
    strbf.setLength(0);
    for(int i=1; i<nestlevel; i++)
         strbf.append(" ");
    strbf.append(s);
         ps.println(strbf.toString());
    if(in == false && nestlevel == 1){
    ps.println();
    ps.println();
    ps.println();
    ps.println();
    void doAfterJob(JoinPoint tjp, Object o)
    captureValues(tjp);
    strbf.setLength(0);
    if(o != null){
    strbf.append("[FO]Return Value = " + o.toString() + " from function: " + sig.getName() + "; Line " + sl.getLine() + " of File " + sl.getFileName() + ".");
    else{
    strbf.append("[FO]Return Value = null" + " from function: " + sig.getName() + "; Line " + sl.getLine() + " of File " + sl.getFileName() + ".");
    Long st = new Long(ll.removeLast().toString());
    strbf.append("Execution Time: " + String.valueOf(System.currentTimeMillis()-st.longValue()) + " milli-sec");
    in = false;
    indent(strbf.toString());
    nestlevel--;

  • StoredProcedure outParameters oracle

    Hi, I have a java project where I try to obtain a data type from a Oracle Stored Procedure.
    My problem is when I recive the Map (the Map is returned by execute method from StoredProcedure of Spring), the object I have received is a * $Proxy3 * Object and I don't know how to obtain my datas:
    In the Oracle data base I have this package:
    CREATE OR REPLACE PACKAGE PACKAGE1 AS   TYPE ref_cur IS REF CURSOR;     PROCEDURE myprocedure (name in varchar2, stock_cursor in out ref_cur);   END PACKAGE1; / CREATE OR REPLACE PACKAGE BODY PACKAGE1 AS     PROCEDURE myprocedure (name in varchar2, stock_cursor in out ref_cur)     IS         BEGIN          OPEN stock_cursor FOR 'select                     id,                     name,                     email                   from                     users                  where                   name = '''||name||''' ';                         END myprocedure; END PACKAGE1; /
    This procedure can return more of one register. Reason I return a ref cur.
    In Java, I try to do this:
    1- I have a test class (*Test_Example*), so I can debug step by step.
    2- In class (*Example*), called from the test class, is where I define the parameters (in and out) and where I compile and where the execute method is called (Actually the method is running the StoredProcedure class of).
    3- I have a class (*GenericProced*) that extends StoredProcedure, where I obtain my datasource.
    GenericProced.java
    import java.util.Map; import java.util.Properties; import javax.naming.InitialContext; import javax.sql.DataSource; import org.apache.log4j.Logger; import org.springframework.jdbc.object.StoredProcedure; public abstract class GenericProced extends StoredProcedure { public GenericProced(String InitialContextFactory, String providerUrl, String urlPkgPrefixes , String pool, String procedimiento) throws Exception   { super(givemeDatasource ( InitialContextFactory,  providerUrl, urlPkgPrefixes , pool), procedimiento);   }           /* I obtain the datasource from a configuracion file. It runs OK */   public static DataSource givemeDatasource (String InitialContextFactory, String providerUrl, String urlPkgPrefixes , String pool) throws Exception   {     Properties prop = new Properties();     prop.setProperty(InitialContext.INITIAL_CONTEXT_FACTORY,InitialContextFactory);     prop.setProperty(InitialContext.PROVIDER_URL, providerUrl);     prop.setProperty(InitialContext.URL_PKG_PREFIXES,urlPkgPrefixes);             //Creamos un contexto y accedemos al recurso.     InitialContext ic = new InitialContext(prop);     DataSource ds = (DataSource)ic.lookup(pool);     return ds;   }// fin método obtenerConexion.       public abstract void definition ();     public abstract Map execute(Object[] objeto); }
    Example.java
    import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import oracle.jdbc.OracleTypes; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.SqlOutParameter; import org.springframework.jdbc.core.SqlParameter; import es.indra.isia.PL.ProcedimientoGenerico; public class Example extends GenericProced{ private static final String name_proce = "PACKAGE1.myprocedure "; private static final String name = "name"; private static final String result = "result"; public Example(String InitialContextFactory, String providerUrl, String urlPkgPrefixes , String pool) throws Exception{     super(InitialContextFactory,  providerUrl, urlPkgPrefixes , pool, name_proce);     definition(); } public void definition() { setFunction(false); //Because is a procedure declareParameter(new SqlParameter(name, OracleTypes.VARCHAR)); declareParameter(new SqlOutParameter("result", OracleTypes.CURSOR, new RowMapper(){     public Object mapRow(ResultSet rs, int rowNum) throws SQLException {     MyEntity entity = new MyEntity(     rs.getString("id"),     rs.getString("name"),     rs.getString("email")     ); return entity;                     }               }));               compile(); } public Map execute(Object[] theObject) {                   Map datas = new HashMap();               datas.put(name, (String) theObject[0]);                 return super.execute(datas); } }
    My RowMapper class MyEntity.javais:
    public class MyEntity{     private String id;     private String name;     private String email;     public MyEntity(String id, String name, String email)     {         this.id = id;         this.name = name;         this.email = email;     }     public String toString(  ) {         return "Employee :"+id+", "+ name;     } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this. email = email; } }
    Test_Example.java
    import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.xml.transform.TransformerException; import Example; public class Test_Example{   public static void main(String[] args){     try{     Test_Example test = new Test_Example();        test.inicioDePrueba("Tom");     }catch (Exception e){       e.printStackTrace();       System.out.println("ERRORRR: "+e);     }   }         public void inicioDePrueba(String name) throws TransformerException, Exception{   Example proc = new Example("org.jnp.interfaces.NamingContextFactory",   "jnp://xxx.xxx.xxx.xxx:xxxx",   "org.jboss.naming:org.jnp.interfaces",   "NPS_POOL_NODE");     // RUN     Object[] objects = new Object[1];     objects[0] = name;         Map resp = proc.execute(objects);           Object obj = (Object)resultado.get("result");   }  }
    When I debug the code (with Eclipse), when I run the line Map resp= proc.execute(objects);, It runs OK, and the resp variable is like:
    name............................value
    resp................................HashMap (id=16)
    ....[0]...............................HashMap$Entry (id=43)
    ........key........................*"result"*
    ........value......................* $proxy3 * (id=47)
    This * $Proxy3 * Object, How can I read It?
    There is other way to obtain a cursor??
    thanks very much.

    jesusmgmarin wrote:
    Hi, I have a java project where I try to obtain a data type from a Oracle Stored Procedure.
    My problem is when I recive the Map (the Map is returned by execute method from StoredProcedure of Spring), the object I have received is a * $Proxy3 * Object and I don't know how to obtain my datas:
    In the Oracle data base I have this package:
    Why? Or to be more explicit - why is it coded so oddly?
    There is other way to obtain a cursor??Via JDBC that requires using Oracle driver specific code.

  • OMBPlus example to bind package function to premapping_process operator

    Does anyone have a script snippet showing how to bind a function within a package to a premapping_process operator ?
    I got this far before the script ref let me down :
    OMBALTER MAPPING 'MY_MAP' \
    ADD PREMAPPING_PROCESS OPERATOR 'FACT_TRANS_PMO' \
    BOUND TO xxxxxxx '../MY_PROJECT/xxxx'
    Any idea what the value of the bindabletype is for a package function ?
    Thanks

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • How can I fix my calendar times? They are 1 hour early after daylight savings.

    After my iPhone automatically changed to daylight savings times, it also made my calendar events 1 hour ealier than they should be. After checking threads I have double checked time zone support is on and matches my timezone in date and time. I sync with Outlook 2010 and the times are still correct here and I have tried to replace information on the iPhone with informqation from outlook, but this hasn't worked. Solutions?

    Outlook (ver 2003 in my case but am sure many other versions...) and iPhone calendars cannot and will not share events with any degree of integrity regards their schedulling when synchronised via iTunes - specifically: events (recurring or otherwise) that are created PRIOR to a Daylight Savings Time event (in the UK our 2 events this year are March 25th and October 28th).
    When transferred to the iPhone calendar during the sync process these events appear to be "altered" on all the incidences they appear AFTER a DST event and are displayed as either an hour ahead or behind their equivalent events within the Outlook calendar that they are supposed to be mirroring. iOS is effectively allocating these daylight-saved events a unique Time Zone of their own - this should NOT be happening.
    Real life examples:
    Weekly timed event (0900hrs-1100hrs) was created on February 5th to run every week until further notice... This displays correctly in Outlook for ALL instances - e.g. 0900hrs-1100hrs and irrespective of how far ahead you check the calendar... on iPhone calendar it displays correctly UNTIL March 25th - thereafter it is showing as timed at 1000hrs-1200hrs.This is massively frustrating... Changing the iPhone Time Zone from what should be the proper local "London" zone (in my case) to UTC I found cured the problem for these "orphans" when the clocks went back an hour last October - but this was a false cure and unfortunately many people discussing similar "cures" within these forums have not taken the trouble to examine the iPhone calendar in more detail and look either back to prev DST event date or forwards to the next DST event date because if they did they would find that all the calendar entries covering those periods will have been shifted by an hour.
    One-off timed events - with or without alarms... These too get pushed forward an hour (post March 25th) - I missed a dentist appointment the other week because of this particular issue. I had actually planned the appointment months ago and at that time input it in iPhone calendar at the correct time/date. Outlook and/or the iPhone (or both in combination) somehow "marked" this appointment as a GMT appointment. When clocks went forward - this GMT "attribute" was preserved and applied to it - effectively the appointment was modified (without any authorisation/involvement on my part) and rescheduled to appear an hour later. Outrageous! Recurring alarmed events suffer same problem - with the alarms sounding an hour later of course.
    I have tried all the so-called "fixes" to be found within these discussion groups and others all around the web and NONE have actually worked. Unfortunately, as I stated earlier, I suspect a lot of the reported "fixes" were premature annoucements from people who may not have their Outlook sync parameters set over a long enough time period for them to be able to view events several months ahead or behind and therefore see what happens to them AFTER the clock-change dates.
    I need to determine which application is screwing this all up - is it Outlook or is it iOS? The fact of the matter is - I was able to use a Windows Mobile device that synced with Outlook 2003 for several years WITHOUT this issue. All that happened when DST event came along was the clock either went forwards or backwards - the events themselves were not interferred with and remained showing at the times they were originally set for - what could be simpler??
    If I were planning to use the iPhone calendar on its own - without wanting to syncronise it with Outlook - I would not be here writing this post - but I purchased this device on the basis that Apple said it would be compatible with Outlook - it was a long thought-out decision as I was moving away from a Windows Mobile environment and ability to sync with Outlook was the only feature I needed to work.
    The Outlook calendar sync feature is broken and has been for at least 3/4 years judging by the many reports to be found on the web. This needs fixing - NOW.

  • Using OPM in tandem with multiple data sources

    We are working on a scenario where rules built in OPM need to run validations on data received from multiple applications (legacy applications and Java / .Net based applications), and the rule output is to be presented to another system. From what I read on OPA, the Oracle Determinations Server should be able to support such a scenario. Is my understanding correct? Please also advise on relevant material I could refer to within OTN for help on such a configuration.
    Thanks,
    Srinath

    user11101031 wrote:
    We are working on a scenario where rules built in OPM need to run validations on data received from multiple applications (legacy applications and Java / .Net based applications), and the rule output is to be presented to another system. From what I read on OPA, the Oracle Determinations Server should be able to support such a scenario. Is my understanding correct? Please also advise on relevant material I could refer to within OTN for help on such a configuration.
    Thanks,
    SrinathSrinath,
    It does sound like you want to use the Determinations Server for this sort of thing. The Determinations Server is a SOAP/XML webservice, so you can call it from both Java and .NET applications. Its a stateless service and works on the principle that you send information and requests for answers, and it returns those answers in the response.
    There are some tutorials that will help you integrate the determinations server with Java and .NET applications on OTN (Oracle Policy Automation on OTN > Tutorials).
    Also there is more general help documentation on using OPA.
    http://www.oracle.com/technology/products/applications/policy-automation/index.html

Maybe you are looking for