Xdofx function least() always returns Yes

Hi,
I am trying to do the following calculation
I have a aggregated field called AD_IMPS_TOTAL. And I also have a field called PRICE and TARGET_IMPS which are not aggregated fields. And I wish to perform the following calcuation.
least (AD_IMPS_TOTAL, TARGET_IMPS) * PRICE / 1000
So I did the following in the RTF template
<?xdofx:least(sum(current-group()/AD_IMPS_TOTAL), TARGET_IMPS) * PRICE div 1000 ?>
But the calcuation always returns zero. Even when I just give the least function, it returns Yes.
Can anyone help me out.
Thanks,
Ram

Hi,
I am trying to do the following calculation
I have a aggregated field called AD_IMPS_TOTAL. And I also have a field called PRICE and TARGET_IMPS which are not aggregated fields. And I wish to perform the following calcuation.
least (AD_IMPS_TOTAL, TARGET_IMPS) * PRICE / 1000
So I did the following in the RTF template
<?xdofx:least(sum(current-group()/AD_IMPS_TOTAL), TARGET_IMPS) * PRICE div 1000 ?>
But the calcuation always returns zero. Even when I just give the least function, it returns Yes.
Can anyone help me out.
Thanks,
Ram

Similar Messages

  • HasEventListener and willTrigger always return true

    Hi  everybody.
    I'm trying to achieve the following result.
    I'm listing all items in a form.
    When I encounter a button I check if it has already an event listener applied to it. If not , I apply the event Listener with addEventListener.
    In this way, the next time I'll list the whole form I won't apply the event listener another time (if for example I apply the same event listener twice to a button which insert a new record in a database as result I'll have 2 records added also if the user clicked once...no good at all!!!)
    To accomplish this task I'm using the Actionscript function hasEventListener(EventType) and here comes the weird thing.
    Eveytime I invoke hasEventListener on the form's button it always returns true event if is the first time a list the form (so no event listener applied yet) , even if before to invoke hasEventListener I run removeEventListener.
    I've got the same behavior when i use willTrigger() function, it always returns true no matter when i call it.
    One possible solution could be set a global boolean property to store if Ialready listed the form and applied the event listener to it, but it would be better using hasEventListener, because I've got a class that perform this form listing , and this class is used on wide project, so if I get to fix this problem inside the class I would fix the problem in the entire project in on shot (I love oop programming!!!!)
    Has anybody already addressed this problem?
    Any advisement would be really appreciated.
    Thanks in advance for the attention.
    Best regards!!
    Luke

    Hi, flex harUI.
    Thanks very much for your reply.
    I knew that if I apply an event listener twice it should fire up only once, but this isn't what happen.
    Here's my scenario:
    -  I've got a component with the form inside it
    - Through a menu a go to the state the component is in and I call an "init" function inside the component
    - In the init function I call the Class which activate the form by applying eventlistener on the button
    - The user can navigate away from the component by click another menu item and then return to the component invoking again the form activation (and so let my application apply once again the addEventListener)
    - Here's what happen: the second,third,... time the user return to the component, when he try - for example - to add a record, the record is added two,three... times according to how many times the users "reinitialized" the component. The same things happen when the user tries to delete a record, he is prompted two,three,.... times if he's sure to delete it.....
    It's a really strange behaviour.
    I've found i worked around, by setting a global bool var "initialized" and before call the form activation i check the value of this var, but It's not a very beautiful solution, 'cause I would prefer to fix this problem inside the class, so the fix the problem in the whole project just in one shot!!! (that's why I would like to use hasEventListener() to check if the button has already an eventListener)
    Thaks anyway for the reply!
    If I've some news I'll update ya.
    Bye!

  • Workspaces - searching always returns 0 records

    Beehive Workspace Client 1.5.1.3.0
    Searching functionality always returns "No results returned based on the search criteria." irrespective of the search string used.
    Is there anything that needs to be run / scheduled / configured to index the Workspace content?
    Cheers.

    Hi everybody
    I had the same problem the solution was
    - Install DB 11.1.0.7 or upgrade 11.1.0.6 to 11.1.0.7
    - Modify DB parameters before Install Beehive
    -java_pool_size at least 50M
    -job_queue_processes 10
    -aq_tm_processes 1
    -streams_pool_size 170M
    -sga_target 500M
    -undo_retention 3600
    And the Searching Funcionality will be working fine
    any issue let me know
    Regards

  • Boolean.getBoolean(String str) always return false

    I'm on macOSX (Tiger), using JSDK 1.5.
    The function Boolean.getBoolean() return always false.
    I try Boolean.getBoolean("true");
    Boolean.getBoolean(Boolean.toString(Boolean.TRUE));
    always false.
    Is it a bug only on macOS, or does I do something wrong?
    so i just made mybooleanVar.equals("true"); done the right result, but it's just strange that the Boolean.getBoolean(...) function did not return the right value... And I can't send this bug to sun, because they don't assure support for macOSX platform... :s

    Yeah, some of the the least intuitive methods in the
    API are this one and its equivalents from the other
    basic type wrapper classes. Confusingly named methods
    in the wrong classes (they should have placed those
    methods in System, if anywhere at all).My vote goes to not anywhere at all.
    Boolean.getBoolean("property");is equivalent to
    Boolean.parseBoolean(System.getProperty("property"));Not worth a method for the saved keystrokes vs the problem in readability. Especially a misnamed method.

  • PolyFit functions - should it return up to order + 1 actual values?

    I have been using the PolyFit function in CVI 2010 (version 10.0.0 (360)) and I am trying to figure out if I am implementing incorrectly, there is a bug for higher order or if I am getting the exepected behavior.
    The function always return zero for coefficients above 26 (order equals between 45 to 90 ). I could understand this if the fit were always good but in cases where the fit is obviously less than optimum the first twenty seven coefficients (o through 26) are populated but the remainder never are. Is this an expected behavior?
    The application is the removal of baseline roll / drift from mass spectrometry data. The file sizes are large (4 MPoint and up) which must be tackled in smaller chunks (at least currently). One may can correct misfit data by limiting the chunk size manaually but the end goal is routine,  robust automation across multiple blind spectra.

    In our case the baseline roll is relatively slow compared with the real signals. However, the correction using the current polyfit has an effective  limit of 500 to 1500 Hz (chi by eye). This requires several regions to be fit and then the  "joints" to be smoothed to cover the approxiamtely 1 MHz bandpass that we are looking for. Such  a piecewise fit is doable but it requires a lot more knowledge of the system if the analysis is to be performed in batch mode (no human intervention.) 
    The main question of what should the return values be suggest that the function should be upward bounded to a value less than 90 (the current limit as described in the  documentation and reported by the debugger ).

  • Malloc() function in C -- returns void or character pointer?

    I've been learning about the free store and heap memory and what not, and I've got two books telling me two different things. One is telling me that the malloc() function returns a void pointer (note: this book has been wrong before) and the other is telling me that it always returns a character pointer. Which is correct? Thanks!

    Tron55555 wrote:
    when you say "if it's declared as returning a char pointer", are you referring to a theoretical scenario with a different compiler that has declared malloc as returning a char pointer instead of a void pointer? Do I have your meaning right?
    Yes. I think void* is standard, but I recall seeing it declared otherwise. The runtime library is written by programmers and a little time spent in this forum should convince you that programmers don't always agree on what's correct.
    This seems to be the case with Xcode, right?
    Yes. That's why I referred you to the manual page from the Darwin layer. The manual installed there should reflect the current version of gcc, which is the C compiler under Xcode. From the occasional unfortunate experience, we also know that "should" doesn't always equate to "is". But just use that manual and you'll do fine.
    Until I read about this in my other book, I never used casts with the malloc function and it always worked fine. Do you think it would be good programming practice for me to get used to writing the function with a cast in case I ever come across a compiler that requires it? I mean it couldn't hurt to write it that way right, even if I am using a compiler that declares malloc as returning a void pointer and doesn't require a cast?
    This is more a question of programming style. Type casts turn off the compiler's type checking. So in most cases, type casts are to be avoided. In the case of malloc, everyone knows the game, so an optional type cast depends on what you consider good style. The goal of all the style rules, from indenting to commenting, is to make it easy for someone else to read your code and understand it well enough to make a required change. So we ask ourselves, "What would I like to see 10 years from now when I won't even believe I wrote this stupid code?".
    \- Ray
    p.s.: Et's excellent point about byte alignment is a wonderful example of how a type cast can get you on the fast track to trouble. Casting a pointer returned from malloc is fine. But casting a pointer after it's been used could cause a problem. Byte alignment in this case means that an int can't start on an odd numbered memory location (I think it might need to be an address divisible by 4 on a 32-bit machine, but that's an Et question--especially as he's responsible for adding the subject of byte alignment to your thread). - R

  • Copy to Goods Receipt PO function on Goods Return

    In current version 2007A there is no Copy to Goods Receipt PO function on Goods Return document. There is only Copy to A/P Credit Memo. This list should contain all available target documents.

    Yes, you can.  You just need to go to add A/P invoice and click on Copy From button.  Then select multiple GRPO to copy.  However, you will be warned that only target FX rate can be used if you have BP currency instead of LC.
    Thanks,
    Gordon

  • APEX_UTIL.GET_PRINT_DOCUMENT always returning empty BLOB

    Dear community,
    I have a huge problem when using the function APEX_UTIL.GET_PRINT_DOCUMENT in a job or database procedure.
    The following code runs perfectly when I integrate it in the APEX application directly e.g. using a button to execute it (of course I use an anonymous PL/SQL block in APEX itself). But when I run the same code as a procedure or job in the APEX database itself I always receive a mail with an empty PDF:
    CREATE OR REPLACE PROCEDURE APEX_DRUG_SAFETY.CALL_MAIL
    is
    l_id number;
    l_document BLOB;
    BEGIN
    wwv_flow_api.set_security_group_id;
    l_document := APEX_UTIL.GET_PRINT_DOCUMENT
    +(+
    p_application_id=>'105',
    p_report_query_name=>'TestReport',
    p_report_layout_type=>'pdf',
    p_document_format=>'pdf'
    +);+
    l_id := APEX_MAIL.SEND
    +(+
    p_to        => '[email protected]',
    p_from      => '[email protected]',
    p_subj      => 'sending PDF via print API',
    p_body      => 'Please review the attachment.',
    p_body_html => 'Please review the attachment.'
    +);+
    APEX_MAIL.ADD_ATTACHMENT
    +(+
    p_mail_id    => l_id,
    p_attachment => l_document,
    p_filename   => 'mydocument.pdf',
    p_mime_type  => 'application/pdf'
    +);+
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'DESMTP.TEST.COM',
    P_SMTP_PORTNO => '25');
    end;
    The problem is that the function APEX_UTIL.GET_PRINT_DOCUMENT always returns an empty BLOB when executed outside of the APEX application. I found this issue in several other posts in this forum but I did not find a solution.
    The mail transmission itself works perfectly. Also with an attachment if e.g. I use another BLOB already stored in the database for testing purposes. So it is not the mail transmission that causes the problem but the empty variable l_document that is still empty.
    Thanks in advance for the help.

    user9007075 wrote:
    Dear community,
    wwv_flow_api.set_security_group_id;
    you should be using this
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'YOUR_WORKSPACE_NAME');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#AEAPI512

  • XML Validation : isschemavalid always returns 0

    Hello XML folks,
    I have registered the schema and tried to validate. It always returns 0 (i.e invalid).
    Could you please let me know what is wrong with XSD or XML
    Thanks,
    Parappa
    SQL> DECLARE
    2 doc varchar2(3800) :=
    3 '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    4 <!--W3C Schema generated by XMLSpy v2005 sp1 U (http://www.xmlspy.com)-->
    5 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:context="http://ibtco.com/common/exception/context" targetNamespace="http://ibtco.com/common/exception/context" elementFormDefault="qualified" attributeFormDefault="unqualified">
    6 <xs:simpleType name="ContextValueType">
    7 <xs:annotation>
    8 <xs:documentation>data types for properties</xs:documentation>
    9 </xs:annotation>
    10 <xs:restriction base="xs:string">
    11 <xs:enumeration value="boolean"/>
    12 <xs:enumeration value="char"/>
    13 <xs:enumeration value="byte"/>
    14 <xs:enumeration value="int"/>
    15 <xs:enumeration value="long"/>
    16 <xs:enumeration value="float"/>
    17 <xs:enumeration value="double"/>
    18 <xs:enumeration value="decimal"/>
    19 <xs:enumeration value="date"/>
    20 <xs:enumeration value="time"/>
    21 <xs:enumeration value="dateTime"/>
    22 <xs:enumeration value="string"/>
    23 </xs:restriction>
    24 </xs:simpleType>
    25 <xs:complexType name="ContextPropertyType">
    26 <xs:annotation>
    27 <xs:documentation>
    28 for holding name/value pair for application data
    29 </xs:documentation>
    30 </xs:annotation>
    31 <xs:simpleContent>
    32 <xs:extension base="xs:string">
    33 <xs:attribute name="Name" type="xs:Name" use="required"/>
    34 <xs:attribute name="Type" type="context:ContextValueType" use="optional"/>
    35 </xs:extension>
    36 </xs:simpleContent>
    37 </xs:complexType>
    38 <xs:complexType name="ExceptionContextType">
    39 <xs:annotation>
    40 <xs:documentation>
    41 for holding the data from applications
    42 </xs:documentation>
    43 </xs:annotation>
    44 <xs:sequence>
    45 <xs:element name="Property" type="context:ContextPropertyType" minOccurs="0" maxOccurs="unbounded"/>
    46 </xs:sequence>
    47 </xs:complexType>
    48 <xs:element name="ExceptionContext" type="context:ExceptionContextType">
    49 <xs:annotation>
    50 <xs:documentation>
    51 top level element exception context
    52 </xs:documentation>
    53 </xs:annotation>
    54 </xs:element>
    55 </xs:schema>';
    56 BEGIN
    57 dbms_xmlschema.registerSchema('http://ibtco.com/common/exception/context', doc);
    58 END;
    59 /
    PL/SQL procedure successfully completed.
    SQL> DECLARE
    2
    3 l_errormsgid VARCHAR2(30);
    4 l_errorinfo VARCHAR2(100);
    5 l_error_context CLOB; -- Error Stack
    6 l_error_context_data CLOB; -- XML Context
    7 l_var_xml_context VARCHAR2(4000);
    8 l_var_error_stack VARCHAR2(4000);
    9 l_sqlCode UTL_ERROR_LOGS.ERROR_CODE%TYPE;
    10 p_ErrorMsgId NUMBER := '0';
    11 p_ErrorInfo VARCHAR2(2000):= 'SUCCESS';
    12 l_xml_context SYS.XMLTYPE;
    13 l_count number :=0;
    14 l_ret NUMBER;
    15 BEGIN
    16
    17
    18 -- Store XML in a clob
    19 /*
    20 l_var_xml_context := '<ExceptionContext>
    21 <Property Name="Name1" Type="boolean">true</Property>
    22 <Property Name="Name2" Type="string">String</Property>
    23 </ExceptionContext>';
    24 */
    25
    26 l_var_xml_context := '<?xml version="1.0" encoding="UTF-8"?>
    27 <!--Sample XML file generated by XMLSpy v2005 sp1 U (http://www.xmlspy.com)-->
    28 <ExceptionContext
    29 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    30 xsi:schemaLocation="http://ibtco.com/common/exception/context"
    31 >
    32 <Property Name="Name1" Type="boolean">true</Property>
    33 <Property Name="Name2" Type="string">String</Property>
    34 </ExceptionContext>';
    35
    36 DBMS_LOB.CREATETEMPORARY
    37 (
    38 lob_loc => l_error_context_data,
    39 cache => TRUE
    40 );
    41
    42 DBMS_LOB.WRITE
    43 (
    44 lob_loc =>l_error_context_data,
    45 amount => length(l_var_xml_context),
    46 offset => 1,
    47 buffer => l_var_xml_context
    48 );
    49
    50 l_xml_context := XMLTYPE(l_error_context_data);
    51
    52
    53 -- validate against XML schema
    54 --l_xml_context.schemavalidate();
    55 l_ret := l_xml_context.isschemavalid('"http://ibtco.com/common/exception/context"');
    56 IF l_ret = 1 then
    57 dbms_output.put_line('Data is valid:' || l_ret );
    58 ELSE
    59 dbms_output.put_line('Data is invalid:' || l_ret);
    60 END IF;
    61 END;
    62 /
    Data is invalid:0
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    Here is the script :
    DECLARE
    doc varchar2(3800) :=
    '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--W3C Schema generated by XMLSpy v2005 sp1 U (http://www.xmlspy.com)-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:context="http://ibtco.com/common/exception/context" targetNamespace="http://ibtco.com/common/exception/context" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:simpleType name="ContextValueType">
              <xs:annotation>
                   <xs:documentation>data types for properties</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="boolean"/>
                   <xs:enumeration value="char"/>
                   <xs:enumeration value="byte"/>
                   <xs:enumeration value="int"/>
                   <xs:enumeration value="long"/>
                   <xs:enumeration value="float"/>
                   <xs:enumeration value="double"/>
                   <xs:enumeration value="decimal"/>
                   <xs:enumeration value="date"/>
                   <xs:enumeration value="time"/>
                   <xs:enumeration value="dateTime"/>
                   <xs:enumeration value="string"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:complexType name="ContextPropertyType">
              <xs:annotation>
                   <xs:documentation>
                        for holding name/value pair for application data
                   </xs:documentation>
              </xs:annotation>
              <xs:simpleContent>
                   <xs:extension base="xs:string">
                        <xs:attribute name="Name" type="xs:Name" use="required"/>
                        <xs:attribute name="Type" type="context:ContextValueType" use="optional"/>
                   </xs:extension>
              </xs:simpleContent>
         </xs:complexType>
         <xs:complexType name="ExceptionContextType">
              <xs:annotation>
                   <xs:documentation>
                        for holding the data from applications
                   </xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="Property" type="context:ContextPropertyType" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:element name="ExceptionContext" type="context:ExceptionContextType">
              <xs:annotation>
                   <xs:documentation>
                        top level element exception context
                   </xs:documentation>
              </xs:annotation>
         </xs:element>
    </xs:schema>';
    BEGIN
    dbms_xmlschema.registerSchema('http://ibtco.com/common/exception/context', doc);
    END;
    DECLARE
         l_errormsgid VARCHAR2(30);
         l_errorinfo VARCHAR2(100);
         l_error_context          CLOB; -- Error Stack
         l_error_context_data     CLOB;     -- XML Context
         l_var_xml_context     VARCHAR2(4000);
         l_var_error_stack     VARCHAR2(4000);
         l_sqlCode          UTL_ERROR_LOGS.ERROR_CODE%TYPE;
         p_ErrorMsgId NUMBER := '0';
         p_ErrorInfo VARCHAR2(2000):= 'SUCCESS';
         l_xml_context SYS.XMLTYPE;
         l_count number :=0;
    l_ret     NUMBER;
    BEGIN
         -- Store XML in a clob
         l_var_xml_context := '<ExceptionContext>
    <Property Name="Name1" Type="boolean">true</Property>
    <Property Name="Name2" Type="string">String</Property>
    </ExceptionContext>';
         l_var_xml_context := '<?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2005 sp1 U (http://www.xmlspy.com)-->
    <ExceptionContext
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ibtco.com/common/exception/context"
    >
    <Property Name="Name1" Type="boolean">true</Property>
    <Property Name="Name2" Type="string">String</Property>
    </ExceptionContext>';
         DBMS_LOB.CREATETEMPORARY
    lob_loc => l_error_context_data,
    cache => TRUE
         DBMS_LOB.WRITE
         lob_loc =>l_error_context_data,
         amount => length(l_var_xml_context),
         offset => 1,
         buffer => l_var_xml_context
         l_xml_context := XMLTYPE(l_error_context_data);
         -- validate against XML schema
         --l_xml_context.schemavalidate();
         l_ret := l_xml_context.isschemavalid('"http://ibtco.com/common/exception/context"');
         IF l_ret = 1 then
              dbms_output.put_line('Data is valid:' || l_ret );
         ELSE
              dbms_output.put_line('Data is invalid:' || l_ret);
         END IF;
    END;
    /

    problem was with the parameter you have passed as schema url.
    here is the modified code.
    problem was in this line.
    l_xml_context.isschemavalid('"http://ibtco.com/common/exception/context"');
    you have to pass the url as just a string without the double quotest (").
    now it returns 1.
    SQL> DECLARE
    2 l_var_xml_context VARCHAR2(4000);
    3 l_xml_context SYS.XMLTYPE;
    4 l_ret NUMBER;
    5 BEGIN
    6 l_var_xml_context := '<?xml version="1.0" encoding="UTF-8"?>
    7 <ExceptionContext xmlns="http://ibtco.com/common/exception/context" xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance" xsi:schemaLocation="http://ibtco.com/common/exception/context
    8 http://ibtco.com/common/exception/context">
    9 <Property Name="Name1" Type="boolean">true</Property>
    10 <Property Name="Name2" Type="string">String</Property>
    11 </ExceptionContext>';
    12 l_xml_context := XMLTYPE(l_var_xml_context);
    13
    14 l_ret := l_xml_context.isschemavalid('http://ibtco.com/common/exception/context');
    15 IF l_ret = 1 then
    16 dbms_output.put_line('Data is valid:' || l_ret );
    17 ELSE
    18 dbms_output.put_line('Data is invalid:' || l_ret);
    19 END IF;
    20 END;
    21 /
    Data is valid:1

  • Execute oracle stored procedure from C# always returns null

    Hi,
    I'm trying to execute a stored procedure on oracle 9i. I'm using .Net OracleClient provider.
    Apparently, I can execute the stored procedure, but it always returns null as a result (actually all the sp's I have there returns null)! I can execute any text statement against the database successfully, and also I can execute the stored procedure using Toad.
    This is not the first time for me to call an oracle stored procedure, but this really is giving me a hard time! Can anyone help please?
    Below are the SP, and the code used from .Net to call it, if that can help.
    Oracle SP:
    CREATE OR REPLACE PROCEDURE APIECARE.CHECK_EXISTENCE(l_number IN NUMBER) AS
    v_status VARCHAR2(5) := NULL;
    BEGIN
    BEGIN
    SELECT CHECK_NO_EXISTENCE(to_char(l_number))
    INTO v_status
    FROM DUAL;
    EXCEPTION WHEN OTHERS THEN
    v_status := NULL;
    END;
    DBMS_OUTPUT.PUT_LINE(v_status);
    END CHECK_CONTRNO_EXISTENCE;
    C# Code:
    string connStr = "Data Source=datasource;Persist Security Info=True;User ID=user;Password=pass;Unicode=True";
    OracleConnection conn = new OracleConnection(connStr);
    OracleParameter param1 = new OracleParameter();
    param1.ParameterName = "v_status";
    param1.OracleType = OracleType.VarChar;
    param1.Size = 5;
    param1.Direction = ParameterDirection.Input;
    OracleParameter param2 = new OracleParameter();
    param2.ParameterName = "l_number";
    param2.OracleType = OracleType.Number;
    param2.Direction = ParameterDirection.Input;
    param2.Value = 006550249;
    OracleParameter[] oraParams = new OracleParameter[] { param1, param2 };
    OracleCommand cmd = new OracleCommand("CHECK_EXISTENCE", conn);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.AddRange(oraParams);
    conn.Open();
    object result = cmd.ExecuteScalar();
    conn.Close();

    Hi,
    Does that actually execute? You're passing two parameters to a procedure that only takews 1 and get no error?
    Your stored procedure doesnt return anything and has no output parameters, what are you expecting to be returned exactly?
    If you're trying to access V_STATUS you'll need to declare that as either an output parameter of the procedure, or return value of the function, and also access it via accessing Param.Value, not as the result of ExecuteScalar.
    See if this helps.
    Cheers,
    Greg
    create or replace function myfunc(myinvar in varchar2, myoutvar out varchar2) return varchar2
    is
    retval varchar2(50);
    begin
    myoutvar := myinvar;
    retval := 'the return value';
    return retval;
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    public class odpfuncparams
         public static void Main()
          OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
          con.Open();
          OracleCommand cmd = new OracleCommand("myfunc", con);
          cmd.CommandType = CommandType.StoredProcedure;
          OracleParameter retval = new OracleParameter("retval",OracleDbType.Varchar2,50);
          retval.Direction = ParameterDirection.ReturnValue;
          cmd.Parameters.Add(retval);
          OracleParameter inval = new OracleParameter("inval",OracleDbType.Varchar2);
          inval.Direction = ParameterDirection.Input; 
          inval.Value="hello world";
          cmd.Parameters.Add(inval);
          OracleParameter outval = new OracleParameter("outval",OracleDbType.Varchar2,50);
          outval.Direction = ParameterDirection.Output;
          cmd.Parameters.Add(outval);
          cmd.ExecuteNonQuery();
          Console.WriteLine("return value is {0}, out value is {1}",retval.Value,outval.Value);
          con.Close();
    }

  • Select query on table rcv_lots_interface is always returning null

    Hi ,
    I need a help on the below issue.
    The issue is after creating PO in Oracle 11i I receive it in MSCA application.
    When we receive it at that point data gets inserted in the table " rcv_transactions_interface " and we have written a trigger on it.
    From the trigger on table " rcv_transactions_interface " we are calling a package and in the package we have select query on "rcv_lots_interface."
    But the select query is always returning null even though we are passing the correct "interface_transaction_id " and also after the "Receiving Transaction Processor" is executed i can see data in the table " RCV_LOT_TRANSACTIONS " for the same transaction.
    Below is the sample code i am using.
    CREATE OR REPLACE TRIGGER inv.RCV_TRAN_TRIGGER
    AFTER UPDATE
    ON po.rcv_transactions_interface
    FOR EACH ROW
    WHEN (NEW.processing_status_code='PENDING'
    AND NEW.destination_type_code IN ('INVENTORY','RECEIVING')
    AND NEW.mobile_txn = 'Y')
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    v_user_id NUMBER;
    v_interface_transaction_id NUMBER;
    v_organization_id NUMBER;
    v_item_id NUMBER;
    v_quantity NUMBER;
    v_resp_id NUMBER;
    v_mobile_txn VARCHAR2(5);
    v_shipment_header_id NUMBER;
    v_bill_of_lading VARCHAR2(100);
    v_group_id NUMBER;
    v_header_interface_id NUMBER;
    BEGIN
    v_interface_transaction_id := :NEW.interface_transaction_id;
    v_organization_id := :NEW.to_organization_id;
    v_user_id := :NEW.created_by;
    v_item_id := :NEW.item_id;
    v_quantity := :NEW.quantity;
    v_resp_id :=fnd_profile.VALUE('RESP_ID');
    v_transaction_type := :NEW.transaction_type;
    v_mobile_txn := :NEW.mobile_txn;
    v_bill_of_lading := :NEW.bill_of_lading;
    v_group_id := :NEW.group_id;
    v_header_interface_id := :NEW.HEADER_INTERFACE_ID;
    INV.INV_RCV_TRX_PKG.INV_RCV_LABEL_GEN_PRC( v_user_id,
    v_interface_transaction_id,
    v_item_id,
    v_quantity,
    v_organization_id,
    v_resp_id,
    v_shipment_header_id,
    v_bill_of_lading,
    v_header_interface_id,
    v_group_id);
    END;
    CREATE OR REPLACE PACKAGE BODY INV.INV_RCV_TRX_PKG
    AS
    PROCEDURE INV_RCV_LABEL_GEN_PRC( p_user_id IN NUMBER,
    p_interface_transaction_id IN NUMBER,
    p_item_id IN NUMBER,
    p_quantity IN NUMBER,
    p_organization_id IN NUMBER,
    p_resp_id IN NUMBER,
    p_shipment_header_id IN NUMBER,
    p_bill_of_lading IN VARCHAR2,
    p_header_interface_id IN NUMBER ,
    p_group_id IN NUMBER
    IS
    v_user_id NUMBER;
    v_print BOOLEAN;
    v_resp_id NUMBER;
    v_resp_appl_id NUMBER;
    v_lot_num VARCHAR2(50);
    BEGIN
    BEGIN
    SELECT application_id
    INTO v_resp_appl_id
    FROM apps.fnd_responsibility_tl frt
    WHERE responsibility_id=p_resp_id;
    END;
    apps.fnd_global.apps_initialize(p_user_id, p_resp_id, v_resp_appl_id);
    BEGIN
    SELECT rli.lot_num , rli.expiration_date
    INTO v_lot_num ,
    v_expiration_date
    FROM apps.rcv_lots_interface rli
    WHERE rli.interface_transaction_id = p_interface_transaction_id ;
    EXCEPTION
    WHEN OTHERS THEN
    v_lot_num :=NULL;
    v_expiration_date :=NULL;
    apps.fnd_file.put_line(fnd_file.log,'Exception while deriving LOT Number ######### '||p_interface_transaction_id||'------'||SQLERRM);
    END;
    END;
    Need your help to understand why the below query is always returning null and what is the solution for it ?
    SELECT rli.lot_num , rli.expiration_date
    FROM apps.rcv_lots_interface rli
    WHERE rli.interface_transaction_id = p_interface_transaction_id ;
    Thanks
    Jaydeep
    Edited by: user10454886 on Mar 25, 2013 6:31 AM
    Hi ,
    I need a solution to this issue at the earliest.
    Appreciate all of your help
    Thanks
    Jaydeep

    Centinul wrote:
    There are a lot of bugs listed in Metalink with respect to wrong results and function-based indexes.
    Here are a few:
    Bug 4028186 Wrong results if function based index exists
    Bug 4717546 Wrong results / poor plan when function based index exists
    Bug 5092688 Wrong results if function based index exists
    Based on reviewing them the workarounds range from dropping the index to setting "_disable_function_based_index" to TRUE.Facinating. It seems to me that if you use the undocumented intitialization parameter you might just as well drop the FBIs too.
    Another hazard of FBIs is the Law of Unintended Consequences. 2 years ago we tried to use one to speed up a query in a PL/SQL package. Worked OK for that purpose, but an unrelated loader on the affected table ran and rand but never finished until the FBI was dropped.

  • GetUsageData is always returning Null

    Let me first start out by stating that I know there are many questions on this issue, and I have read them all. However, none of the suggestions that I have read have seemed to help my situation. Therefore, I figure I would supply my code with the hopes
    that someone can solve the issue that is mentioned in the title. Let me first supply a little bit of background.
    My goal in this code is to determine what are the most visited sites in our SharePoint 2010 farm. To do this, I figured I would cycle through all of the webs in the farm, and then obtain the amount of page views within each site using the GetUsageData function.
    Just to test if the GetUsageData was supplying the correct data, I coded the web part in such a way where if GetUsageData returned "Null", it would print it for every site, and "Not Null" if otherwise. In every case I have tested this web part, it has always
    returned Null for evey site it has checked.
    I am fairly new to programming web parts in C#, so a lot of this code is derived from what I have read when researching the subject. If anyone can assist me to see where I could fix my issue, I would greatly appreciate it.
    Thank you.
    Below is my Code:
    using System;
    using System.Data;
    using System.Collections;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.SharePoint.WebControls;
    //This code has been derived from the following link: http://blog.rafelo.com/2008/07/22/iterating-through-sharepoint-web-applications-site-collections-and-sites-webs/
    namespace WebAnalyticsTest.Test
    [ToolboxItemAttribute(false)]
    public class Test : WebPart
    //For testing purposes. More is explained further in the code.
    int test;
    ArrayList totalHitsArray = new ArrayList();
    int totalHits;
    DataGrid grid = null;
    public void BeginProcess()
    // Get references to the farm and farm WebService objects
    // the SPWebService object contains the SPWebApplications
    SPFarm thisFarm = SPFarm.Local;
    SPWebService service = thisFarm.Services.GetValue<SPWebService>("");
    foreach (SPWebApplication webApp in service.WebApplications)
    //Execute any logic you need to against the web application
    //Iterate through each site collection
    foreach (SPSite siteCollection in webApp.Sites)
    //do not let SharePoint handle the access denied
    //exceptions. If one occurs you will be redirected
    //in the middle of the process. Handle the AccessDenied
    //exception yourself in a try-catch block
    siteCollection.CatchAccessDeniedException = false;
    try
    //Execute any logic you need to against the site collection
    //Call the recursive method to get all of the sites(webs)
    GetWebs(siteCollection.AllWebs);
    catch (Exception webE)
    //You should log the error for reference
    //reset the CatchAccessDeniedException property of the site
    //collection to true
    siteCollection.CatchAccessDeniedException = true;
    public void GetWebs(SPWebCollection allWebs)
    //iterate through each site(web)
    foreach (SPWeb web in allWebs)
    if(web.Exists)
    //For every site the program finds, the count will increase by one. If this code is executed by a user who does not have
    //full control, then the count will be inaccurate as it will only return the number of sites the user can access.
    test += 1;
    DataTable table = web.GetUsageData(Microsoft.SharePoint.Administration.SPUsageReportType.browser, Microsoft.SharePoint.Administration.SPUsagePeriodType.lastMonth);
    if (table == null)
    HttpContext.Current.Response.Write("Null");
    else
    HttpContext.Current.Response.Write("Not Null");
    protected override void CreateChildControls()
    BeginProcess();

    Hi, Shiladitya.
    Sorry I haven't replied until now. I'll paste the current code I am using, but my solution is not yet complete. What it does as of right now is it creates a data table with all of the webs located in your farm, as well as the total amount of page views for
    each web. What I noticed though is that when I compare these stats with the web analytics for the specific web, they don't match. I put the project on hold for this reason, and I might start it back up again soon. Feel free to use the code, and perhaps you
    maybe can shed some light on my issue.
    using System;
    using System.Data;
    using System.Collections;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.SharePoint.WebControls;
    //This code has been derived from the following link: http://blog.rafelo.com/2008/07/22/iterating-through-sharepoint-web-applications-site-collections-and-sites-webs/
    namespace WebAnalyticsTest.Test
    [ToolboxItemAttribute(false)]
    public class Test : WebPart
    //For the total amount of hits for a single web
    int totalHits;
    //The final data table that will be added to.
    DataTable final = new DataTable();
    //Size of the data table
    int finalSize = 0;
    //The grid that will be displayed
    DataGrid grid = new DataGrid();
    public void BeginProcess()
    //To allow users with lower permissions to view the proper content, the code must be used with RunWithElevatedPrivileges.
    SPSecurity.RunWithElevatedPrivileges(delegate()
    // Get references to the farm and farm WebService objects
    // the SPWebService object contains the SPWebApplications
    SPFarm thisFarm = SPFarm.Local;
    SPWebService service = thisFarm.Services.GetValue<SPWebService>("");
    foreach (SPWebApplication webApp in service.WebApplications)
    //Execute any logic you need to against the web application
    //Iterate through each site collection
    foreach (SPSite siteCollection in webApp.Sites)
    //do not let SharePoint handle the access denied
    //exceptions. If one occurs you will be redirected
    //in the middle of the process. Handle the AccessDenied
    //exception yourself in a try-catch block
    siteCollection.CatchAccessDeniedException = false;
    try
    //Execute any logic you need to against the site collection
    //Call the recursive method to get all of the sites(webs)
    GetWebs(siteCollection.AllWebs);
    catch (Exception webE)
    //Place any error logic here
    //reset the CatchAccessDeniedException property of the site
    //collection to true
    siteCollection.CatchAccessDeniedException = true;
    public void GetWebs(SPWebCollection allWebs)
    //iterate through each site(web)
    foreach (SPWeb web in allWebs)
    if (web.Exists)
    DataTable table = web.GetUsageData(SPUsageReportType.url, SPUsagePeriodType.lastMonth);
    if (table != null)
    //Determines the total amount of hits for a single web
    foreach (DataRow row in table.Rows)
    int num = System.Convert.ToInt32(row["Total Hits"]);
    totalHits = totalHits + num;
    //Temporarily stores the total hits with the associated web.
    DataTable temp = new DataTable();
    temp.Columns.Add("Site", typeof(string));
    temp.Columns.Add("Total Views", typeof(int));
    temp.Rows.Add(web.Title, totalHits);
    //Merges the data table "temp" to the data table "final"
    final.Merge(temp);
    //Data table size increases by one.
    finalSize += 1;
    //Resets the total hit counter
    totalHits = 0;
    protected override void CreateChildControls()
    BeginProcess();
    //Sorts the data table bases on the total hits
    final.DefaultView.Sort = "Total Views DESC";
    //The total amount of pages to show is 10. Therefore, only execute this If statement if the final's size > 10.
    if (finalSize > 10)
    //Data table of the top ten most viewed pages. This data table will be used in the data grid "grid"
    DataTable topTen = final.Clone();
    for (int i = 0; i < 10; i++)
    topTen.ImportRow(final.Rows[i]);
    grid.DataSource = topTen;
    else
    grid.DataSource = final;
    grid.DataBind();
    this.Controls.Add(grid);
    ListBox list = new ListBox();

  • Businessobject.isValid always returns false

    Hi,
    I have created an object against to BOXXXXX business object by using below method having all the input values to formal arguments.
    CreateAction(actType As String,sfakna1 As String,Date1 As Date,Date2 As Date,description As String) As BusinessObject
    Dim boActivity As BusinessObject
    boAction = BusinessRootObject.BusinessFactory.CreateBusinessObject("BOXXXXX", "")
    We have some mandatory attributes and some normal attributes in BOXXXXX. We are setting values for all the mandatory attributes and setting 5 values to normal attributes. by using this code.
    With boActivity
                 ''''Normal attributes
                .SetAttribute("A", False)
                .SetAttribute("C", sfakna1)      
                .SetAttribute("D", description)
                .SetAttribute("E", Date1)    
                .SetAttribute("F", Date2)
                ''Mandatory attributes.
                .SetAttribute("F", "1")      
                .SetAttribute("G", "ABC")         
                .SetAttribute("H", "ACT")        
                .SetAttribute("B", actType)    
            End With
    But during verifying the boAction which always returns false in below condition.
           If boAction.IsValid() Then
           End if
    Please provide me the way to make that boAction returns true.
    Thanks in advance.
    Thanks,
    Naidu

    Thanks Shankar for your prompt response.
    Verified that we have set same lengh in our input parameters as in businessobject and verifed that each attribute(normal+mandatory) returns true. Verified with individually by using the below code.
    boAction.IsValidAttribute("A")  ''Normal
    boAction.IsValidAttribute("F")   ''Mandatory
    We have included all the mandatory fields in our function with same data types and same properties.
    Please suggest  me the inputs and share me the code if any to findout the causing attribute which makes boAction.IsValid() condition false.
    Thanks in advance
    Regards,
    Naidu

  • System.capabilities.language always returns en on OS X Leopard

    Hello everyone!
    I am having some trouble with the Flash (ActionScript 2.0) on
    an Intel MAC running OS X Leopard. It seems that no matter how i
    change the OS language (via System Preferences or at installation)
    the System.capabilies.language call always returns "en". More
    bothering is that apparently, on non-intel macs running Leopard,
    some languages are detected and shown correctly (German and
    Italian)...
    I looked al over the Internet for a hint but i could not find
    any. So ... please help... is this an OS problem, a Flash problem
    or do i need a "native french" (or any other language) Leopard
    installation disk ?
    Thanks!

    Hello,
    Here's information for Resolving Kernel Panics
    You've done a great job so far of trouble shooting...
    -did the apple hardware test
    -tested the RAM for any defects
    -recently did an ARCHIVE and INSTALL
    Before you go to the link above, have you tried checked the boot disk for errors? If not..;.
    Restart your Mac while holding down the C key, pressing the power button and inserting your restore disk all at the same time. An Installer window will open, but do not proceed with any installations. Instead, from the Menu Bar, select Utilities > Disk Utility. In the Disk Utility window click First Aid, and then click Verify. If Disk Utility reports errors, click Repair. When Disk Utility is finished, from the Menu Bar, select Utilities/Startup Disk. Select MacintoshHD 10.x.x and click Restart.
    Try disconnecting any peripherals, iPod's, mice, keyboards, cameras....
    (I know you have a MacBook, but many people use the peripherals anyway).
    Reboot and see if that makes a difference.
    Get Leopard Cache Cleaner available here:
    http://www.apple.com/downloads/macosx/systemdiskutilities/leopardcachecleaner.html
    "Leopard Cache Cleaner lets you create bootable Emergency Disks that include system repair utilities and LCC’s powerful cache cleaning functions. If disaster strikes, the power of Leopard Cache Cleaner is available at the command prompt in Single User Mode"
    If none of the above help, then go to the link above for kernel panics.
    Carolyn

  • HST65_DUTCH: Not_On_Stack_Yes always returns True

    Hello,
    It seems that the Not_On_Stack_Yet always returns true.
    I used some trace commands to show the uk1 value in the Debug Monitor and everything seems right, allthough I get always a true... And prior to my trace output I see that funtion to validate if the BR is needed and I see the BR is added.
    Could you confirm the Not_On_Stack_Yet is working properly.
    I went through through the Headstart code myself, this are my remarks:
    - See nothing strange !!
    - The add_rule checks if the rule is allready on the stack. If not, the br will be added. The add_rule doens't uses the Not_On_Stack_Yet function !!!!!
    Thanks for your help,
    Marcel Overdijk

    Marc,
    I made the following example. It's NOT working.
    * 2 BusinessRules:
    BR_JNT001_MOD (insert, update, delete)
    BR_JNT002_TPL (insert, update)
    Trigger When Condition
    qms_transaction_mgt.not_on_stack_yet
    ( p_br_name => 'BR_JNT001_MOD'
    , p_uk_comp1 => to_char(:new.bdt_id)
    , p_uk_comp2 => to_char(:new.volgnummer)
    * Debug Output:
    19:17:41 - QMS_TRANSACTION_MGT.ADD_BUSINESS_RULE BR_JNT002_TPL
    19:17:41 - MAS_DEV.MAS_JNT_CAPI.need_br_jnt002_tpl (f)
    19:17:41 - QMS_TRANSACTION_MGT.ADD_BUSINESS_RULE BR_JNT001_MOD
    19:17:41 - MAS_DEV.MAS_JNT_CAPI.need_br_jnt001_mod (f)
    * PK components of table.
    PROMPT Creating Primary Key on 'MAS_JOURNAALPOSTEN'
    ALTER TABLE MAS_JOURNAALPOSTEN
    ADD (CONSTRAINT MAS_JNT_PK PRIMARY KEY
    (BDT_ID
    ,VOLGNUMMER))
    * Need function in capi
    function need_br_jnt002_tpl
    return boolean
    is
    l_when_condition boolean;
    l_updating boolean;
    l_dml_operations boolean;
    begin
    trace('need_br_jnt002_tpl (f)');
    l_when_condition := qms_transaction_mgt.not_on_stack_yet
    ( p_br_name => 'BR_JNT001_MOD'
    , p_uk_comp1 => to_char(g_current_row.bdt_id)
    , p_uk_comp2 => to_char(g_current_row.volgnummer)
    g_current_ind.brutobedrag
    := g_current_ind.brutobedrag
    and
    (g_current_row.brutobedrag
    <> g_current_old_row.brutobedrag
    or
    (g_current_row.brutobedrag is null
    and
    g_current_old_row.brutobedrag is not null
    or
    (g_current_row.brutobedrag is not null
    and
    g_current_old_row.brutobedrag is null
    g_current_ind.btw_bedrag
    := g_current_ind.btw_bedrag
    and
    (g_current_row.btw_bedrag
    <> g_current_old_row.btw_bedrag
    or
    (g_current_row.btw_bedrag is null
    and
    g_current_old_row.btw_bedrag is not null
    or
    (g_current_row.btw_bedrag is not null
    and
    g_current_old_row.btw_bedrag is null
    g_current_ind.nettobedrag
    := g_current_ind.nettobedrag
    and
    (g_current_row.nettobedrag
    <> g_current_old_row.nettobedrag
    or
    (g_current_row.nettobedrag is null
    and
    g_current_old_row.nettobedrag is not null
    or
    (g_current_row.nettobedrag is not null
    and
    g_current_old_row.nettobedrag is null
    l_updating := g_updating
    and (g_current_ind.brutobedrag
    or
    g_current_ind.btw_bedrag
    or
    g_current_ind.nettobedrag
    l_dml_operations := g_inserting
    or l_updating
    if br_enabled('BR_JNT002_TPL')
    then
    return l_when_condition
    and
    (g_validate_all_static
    or
    l_dml_operations
    else
    return false;
    end if; -- br_enabled
    end need_br_jnt002_tpl;

Maybe you are looking for

  • What the heck is Accessorize Test?

    Okay. something weird. Something called Accessorize Test has occured to my Ipod. out of the blue, I turned it on, and it went to Accessorize Test. I'm not sure how to fix this, I tried everything the help pages sugguest, but restarting doesn't do any

  • Saving scanned doc error message when using Mac Maverick with HP Photosmart C4795

    When I use HP Scan to scan documents with my HP Photosmart C4795 it scans fine.  The problems comes when I try to save the scanned document. I get one of two things, an error message or black document.  I get an error that states "An error has occurr

  • Reloading a Page when Browser back button is pressed

    Hi There We are designing a web site in which all the pages are dynamic depending on what he does with his email and addressbook system. Problem is when the uers request a change to the his email accounts or addressbook entries he is sent to editable

  • Does TM9.1 SP02 support the check of resource availiability across FROs?

    hi TM experts, In planning or FRO/FU checks of TM9.1 SP02, will system check the current resource has been used in another document at the same time or whether it is in the downtime? If the answer is YES, in which topic I can find in the application

  • 4k display: Limited scaled resolutions when in portrait?

    Hi, I've got a MacBook Pro, late 2013, retina, discrete graphics, Yosemite.  I like it.  Also have a Dell P2815Q monitor.  I hate it.  I would, however, like to gain better control over the resolution of the Dell display when in portrait mode.  Curre