RefNum error user-defined

"'A problem similar to others that have already been posted. I use "Open FPGA VI reference" (whether with a bit file or a VI) and then pass out this VI and in a series of reference face. It works fine until I do any kind of change to say "Open FPGA VI reference" change the references bitfile or, evolution from a bit of a VI file. At this point I broke my son and I end up spending an unnecessary amount of time again in and out links reference to fix the broken wires.  I tried "FPGA host reference for the definition of the type" but this does not solve the problem either. According to LV2009 SP1, it's a bug and it is resolved - but I have LV2009 SP1 installed with module FPGA version 9.0.0 as surely it should work? Maybe I do it? It seemed like a simple idea to pass an autour reference for you to use screw Sub - but it's driving me crazy and wasting time :-(

I just like to be able to change the use of FPGA new code code recompilation (or choose to return to the old code) without having to recreate a link to all the screws on the host side evertime I do!

Just to update our users, it seems that after you upgrade to LabVIEW FPGA 2009 SP1 (which fixes this bug), you must double-click 'Reference of VI FPGA open' and uncheck the option "Bind FPGA host reference to the type definition", click OK and then go back in and re - link. This will finally solve the broken wires.

I hope it worked for you too blue_cortina, if not, let me know.

Kind regards

Michael S.
Technical sales engineer
NEITHER UK & Ireland

Tags: NI Software

Similar Questions

  • registration of user-defined presets error

    I transferred all my programs to my new computer, Windows 10 using Zinstall. All the programs work very well except for Illustrator. When I close it, I get two errors: -.

    User-defined Favorites registration error

    Presets contours registration error

    I uninstalled and reinstalled but the error is still there.

    Thanks a lot for your suggestions

    Giroux,

    I think that the good order/way is to update the operating system, and then reinstall the applications. Which was how you did it?

    It may be best to reinstall using the way complete three steps (the otherwise strange things may persist):

    (1) uninstall (check the box to delete the preferences),

    (2) run the cleanup tool, see the link below,

    (3) reinstall.

    http://www.Adobe.com/support/contact/cscleanertool.html

  • Question of the user defined Type (UDT)

    Hello

    The attached file is NEITHER sample to call a VB6 vi.

    The following is declared in the declaration section:

    ' Global declarations
    Dim lvapp As LabVIEW.Application
    Dim vi LabVIEW.VirtualInstrument

    When I paste these statement in another project (that I'm working on), I get an error 'undefined user-defined type '.

    Can someone point out to me were in the sample, these type definitions are declared?

    Thank you

    Rafi

    PS the attachment is indeed xxx.rar and not xxx.zip.  I changed the name because .rar has not been accepted.  Please rename .rar

    Thank you

    I forgot to mark references to my project

    Project--> references--> LabView. Type library of xxx

    Thank you

  • Use of user defined function in mathscript containing a structure

    Hi, I am a novice user of LabView MathScript module,

    I have the following problem when integrating my code MATLAB, LabView, for HMM: in my program, I tried to call a MATLAB called "mixgaussinit.m" user-defined function, it shows this error...

    "

    I just noticed that these files appear to be copyrighted. My first question is do you have author permissions to post them in a public forum? If this isn't the case, then you can remove them. That being said, I have reviewed the code and it seems easy enough to work around your problems (provided that you have the copyright permissions). How to bypass the problems is to replace the fields of the struct with variables. There is of course allows you to change some definitions of functions for input and output the necessary variables which I think was the best 5 variables. You will also need to redo the code that uses a table of error checking cell. In total, I estimated about 30 minutes of work. I would have given you work around these files had not been protected by copyright. So, unfortunately, you will need to implement the work around you.

  • Task to the mapping of object status: is it possible to have user-defined status?

    Hi guru.

    'Task of object state Mapping' tab for the definition of the process allows you to set the "status of the object' to 'status '.

    'Status of the object' contains values defined on "Definition of the State" for defined object "resource". It is possible to extend this list by adding user-defined status. But the allocation of these statutes (for example, 'view data name updated') for status (say, 'C', finished) it causes a corresponding Bundle error is found.

    How is it possible to use the user defined the statutes?

    Hello

    These statutes are pre-defined and shipped by the IOM.

    You cannot change C-> etc. put into service.

    ~ J

  • Error: Application-defined or object-defined error

    Hello

    My Finance users are trying to export to Excel, all of the entries in a period and a category for a location, but whenever they do it, they get this error:

    Error: Application-defined or object-defined error

    The process works for quiet some time, but she always ends up with this error. That's what I see on the newspaper:

    In addition, we use FDM 9.3.1

    * Start the journal entry for the Runtime Error FDM [2014-03-21-16: 05:56] *.
    -------------------------------------------------------------
    ERROR:
    Code......................................... 1004
    Description... Application-defined or object-defined error
    Process... clsUtility.mRecordsetToExcel
    The component... upsWDataWindowDM
    Version...................................... 931
    Thread....................................... 5892

    IDENTIFICATION:
    User......................................... ggreen
    Name of the computer... USNII1W3APPS29
    App Name..................................... NIIFDMAPP
    Client App................................... WebClient

    CONNECTION:
    Provider..................................... ORAOLEDB. ORACLE
    Database server...
    Name of the database... HFMPROD
    Trust connect... Fake
    Connect status... Open connection

    GLOBALS:
    Location..................................... MEXICO_GL
    Location ID... 37
    Location Seg... 24
    Category..................................... REAL
    ID of the category... 4
    Period....................................... Jan - 2014
    Period ID.................................... 31/01/2014
    POV Local.................................... True
    Language..................................... 1033
    User Level................................... 19
    All Partitions... Fake
    Is Auditor................................... Fake

    Hello

    This could be the problem such as Excel on the server is used to export the file.

    Can you try to install 2007?

    is the error generated when exporting 'imported data' or ' periods/categories?

    You said 73200... so I guess that data. You can try to import less than 65000 rows and try again. Then you can confirm the root cause.

    Concerning

  • Variable user defined appear as not defined in CHM and webhelp

    I have my RoboHelp files to source code control. Recently, our administrator made a copy of my help topics and places in a different folder in TFS. Now when I create webhelp or compiled MS HTML help, the user defined variables appear as being undefined in aid. When I visualize in RoboHelp well, they look like they do in the Viewer. It's only when aid is being built that these variables are somehow lost. Is there some required files that maybe did not move in the source code control? I supported my previous files and these work very well.

    I corrected sort myself, but I will post the solution in case anyone else runs into this error.

    I added a new variable that I named 'Test '. I added a new text and each of my variables defined by the user inserted in this text, including the new. I saved the topic and recompiled. The variables now appear correctly. Go figure.

  • How to use the negation in the user defined rules?

    Hello

    Can you please show me an example using negation in the rule set by the user? I created a rule like below (the rule says that if a patient has a fever problem and not having penicillin hypersensitivity, then recommend medication1):

    INSERT INTO mdsys.semr_myMedicineRB VALUES ('rule1',

    ' (? p RDF: type: Patient) (? p: present? c1) (? c1 RDF: type: fever) (? c2 RDF: type: Penicillin_Hypersensitivity)',

    "(NOT_EXISTS (p: present c2))',

    ' (? p: recommendation: medication1)',

    SEM_ALIASES (SEM_ALIAS (",'http://www.example/medicine#')));

    The rule correctly applied in the modules. However, I cannot move to the phase of creation entailment and got errors:

    ORA-29532: Java call terminated by eception Java exception: java.sql.SQLException: parameter IN or OUT to missing index: 1

    ORA-06512: at the 'MDSYS. SDO_SEM_INF_INTERNAL', line 16453

    ORA-06512: at the 'MDSYS. SDO_SEM_INFERENCE', line 302

    ORA-06512: at the 'MDSYS. SDO_SEM_INFERENCE', line 352

    ORA-06512: at the 'MDSYS. RDF_APIS', line 118

    ORA-06512: at line 2

    29532 00000 - "Java call terminated by eception Java exception: %s."

    * Cause: A mistake or a Java exception has been reported and could not be

    solved by Java code.

    * Action: Modify Java code, if this behavior is not expected.

    According to the post primitives(noValue,remove) integrated for user defined rules, it seems that negation is not supported in rules defined by the user. Can you please advice how to implement the negation in the rules defined by the user?  Thank you very much in advance.

    Hong

    Salvation Hong,

    Negation is not supported in rules defined by the user. If you need a work-around, please follow the suggestion in the post you referenced.

    If you use Oracle Database Release 12 c, user-defined inference can certainly manage negation.

    It will be useful,

    Zhe Wu

  • PROGRAMMER (USER) DEFINED RECORDS

    Hi all;


    I do self - study of PL/SQL concepts for user-defined folders.

    I get the error.


    SQL > desc emp;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    EID                                               NUMBER

    ENAME VARCHAR2 (15)

    VARCHAR2 (10) EQUAL

    ESALARY VARCHAR2 (15)

    ECITY VARCHAR2 (15)


    SQL > select count (*) from emp;

    COUNT (*)

    2


    PROGRAMMER (USER) DEFINED RECORDS


    SQL > DECLARE

    2 C_cr CURSOR IS

    3. Select ename, equality, esalary, eid, ecity emp;

    4 EMP_DETAILS RECORD TYPE IS

    5 (e_id emp.eid%TYPE,

    6 e_name emp.ename%TYPE,

    7 e_qual emp.equal%TYPE,

    8 e_salary emp.esalary%TYPE,

    e_city 9 emp.ecity%TYPE);

    10 emp_detail e1;

    BEGIN 11

    12 C_cr OPEN;

    LOOP 13

    14 C_cr FETCH in emp_detail;

    15 WHEN OUT C_cr % NOTFOUND;

    16 DBMS_OUTPUT. Put_line (emp_detail.e_id | emp_detail.e_name | emp_detail.e_q ual | emp_detail.e_salary | emp_detail.ecity);

    17 END OF LOOP;

    18 DBMS_OUTPUT. Put_line (C_cr % ROWCAMOUNT);

    19 CLOSE C_cr;

    20 END;

    21.

    emp_detail e1;

    *

    ERROR on line 10:

    ORA-06550: line 10, column 12:

    PLS-00201: identifier "E1" must be declared.

    ORA-06550: line 10, column 12:

    PL/SQL: Ignored Element

    ORA-06550: line 14, column 17:

    PLS-00320: the declaration of the type of the expression is incomplete or

    Malformed

    ORA-06550: line 14, column 1:

    PL/SQL: SQL statement ignored

    ORA-06550: line 16, column 22:

    PLS-00320: the declaration of the type of the expression is incomplete or

    Malformed

    ORA-06550: line 16, column 1:

    PL/SQL: Statement ignored



    SQL > select * from v version $;

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

    PL/SQL Release 10.2.0.1.0 - Production

    CORE 10.2.0.1.0 Production

    AMT for Linux: Version 10.2.0.1.0 - Production

    NLSRTL Version 10.2.0.1.0 - Production

    Thank you all;

    MY QUESTION IS: type_name, record_type must be the same?

    It is not necessary to be the same. Once you create a record type, then it might be assigned to different variables, such as:

    SQL > DECLARE

    2 C_cr CURSOR IS

    3. Select ename, equality, esalary, eid, ecity emp;

    4 TYPE EMP_DETAILS IS RECORD

    5 (e_id emp.eid%TYPE,

    6 e_name emp.ename%TYPE,

    7 e_qual emp.equal%TYPE,

    8 e_salary emp.esalary%TYPE,

    e_city 9 emp.ecity%TYPE);

    10 emp_detail EMP_DETAILS;

    11 emp_detail_2 EMP_DETAILS;

    12 emp_detail_3 EMP_DETAILS;

    13 l_id NUMBER;


    Now, he becomes similar to a variable_type of variable_name in the declaration section. Emp_detail or emp_detail_2 is a variable of type EMP_DETAILS, like the variable l_id that can hold values of type numbers.

  • User Defined functions in the Mapper

    I have user-defined functions that work in BPEL but I can't make them work in the Mapper. They appear when expected for jDeveloper but throw "function not found" errors

    Can someone look at my config files and see if the error comes out? Thank you bunches!

    BPEL file:

    " < soa-xpath-functions xmlns =" http://xmlns.Oracle.com/SOA/config/XPath "" "

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    version = "11.1.1.

    resourceBundle = "oracle.tip.tools.ide.common.resource.IDEMessageBundle"

    >

    < name of the function = "f17:editCaseNumber" >

    com.F17.CustomFunction.editCaseNumber < className > < / className >

    < return type = "tree" / >

    < params >

    < param name = "stringToFormat" type = "string" / >

    < param name = "order" type = "string" / >

    < / params >

    number of valid cases and formats < desc > < / desc >

    < detail >

    <! [CDATA [this is a custom function.] If you use it, you must include the

    Following namespace declaration in your BPEL file.

    < br / > < br / >

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    < br / > < br / >

    USE: f17:editCaseNumber(string,string) < br / >

    Channel 1 is the data < br / >

    Channel 2 is the command. Valid commands are: < br / >

    1 = number of control check and come back as nnnnnnnnnn < br / >

    2 = number of control check and come back as nnn-nnnnnnn < br / >

    3 = Append check digit and return under nnnnnnnnnn < br / >

    4 = Append check digit and return under nnn-nnnnnnn

    < br / > < br / >

    Returns XML document fragment: < br / >

    Import of f17userDefinedFusnctions.xsd space variable prototype. < br / >

    See documentation for more details.]] >

    < / details >

    < / feature >

    < name of the function = "f17:compressFile" >

    com.F17.CustomFunction.compressFile < className > < / className >

    < return type = "tree" / >

    < params >

    < param name = "stringToFormat" type = "string" / >

    < / params >

    < desc > compress long strings by DB storage < / desc >

    < detail >

    <! [CDATA [this is a custom function.] If you use it, you must include the

    Following namespace declaration in your BPEL file.

    < br / > < br / >

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    < br / > < br / >

    USE: f17:compresFile (string)

    < br / > < br / >

    Returns XML document fragment: < br / >

    See documentation for more details.]] >

    < / details >

    < / feature >

    < name of the function = "f17:sortList" >

    com.F17.CustomFunction.sortList < className > < / className >

    < return type = "tree" / >

    < params >

    < param name = "listIn" type = "string" / >

    < / params >

    lists of kinds of < desc > < / desc >

    < detail >

    <! [CDATA [this is a custom function.] If you use it, you must include the

    Following namespace declaration in your BPEL file.

    < br / > < br / >

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    < br / > < br / >

    USE: f17:sortList (String) < br / >

    Build the string as: & lt; list & gt; & lt; point & gt; [data] & lt; / point & gt;... & lt; / list & gt; < br / >

    Returns XML document fragment: < br / >

    Import of f17userDefinedFusnctions.xsd space variable prototype. < br / >

    See documentation for more details.]] >

    < / details >

    < / feature >

    < name of the function = "f17:replaceString" >

    com.F17.CustomFunction.replaceString < className > < / className >

    < return type = "string" / >

    < params >

    < param name = "StringToFix" type = "string" / >

    < param name = "RegX" type = "string" / >

    < param name = "replaceString" type = "string" / >

    < param name = "mode" type = "string" / >

    < / params >

    Sets < desc > replaceFirst and replaceAll functions java < / desc >

    < detail >

    <! [CDATA [this is a custom function.] If you use it, you must include the

    Following namespace declaration in your BPEL file.

    < br / > < br / >

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    < br / > < br / >

    USE: f17:replaceString(String,String,String,String) < br / >

    Chain change, regular expression, mode [optional] replace the string - 1 = all, 2 = first by default all the < br / >

    See documentation for more details.]] >

    < / details >

    < / feature >

    < / soa-xpath-functions >

    file Mapper:

    < soa-xpath-functions

    " xmlns =" http://xmlns.Oracle.com/SOA/config/XPath "" "

    ' xmlns:repl = ' http://www.Oracle.com/xsl/transform/Java/COM.F17.CustomFunction.replaceString "" "

    ' xmlns:comp = ' http://www.Oracle.com/xsl/transform/Java/COM.F17.CustomFunction.compressFile "" "

    version = "11.1.1.

    resourceBundle = "oracle.tip.tools.ide.common.resource.IDEMessageBundle"

    >

    < name of the function = ' model: compressFile ">

    com.F17.CustomFunction.compressFile < className > < / className >

    < return type = "tree" / >

    < params >

    < param name = "stringToFormat" type = "string" / >

    < / params >

    < desc > compress long strings by DB storage < / desc >

    < detail >

    <! [CDATA [this is a custom function.] If you use it, you must include the

    Following namespace declaration in your BPEL file.

    < br / > < br / >

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    < br / > < br / >

    USE: f17:compresFile (string)

    < br / > < br / >

    Returns XML document fragment: < br / >

    See documentation for more details.]] >

    < / details >

    < / feature >

    < name of the function = "repl:replaceString" >

    com.F17.CustomFunction.replaceString < className > < / className >

    < return type = "string" / >

    < params >

    < param name = "StringToFix" type = "string" / >

    < param name = "RegX" type = "string" / >

    < param name = "replaceString" type = "string" / >

    < param name = "mode" type = "string" / >

    < / params >

    Sets < desc > replaceFirst and replaceAll functions java < / desc >

    < detail >

    <! [CDATA [this is a custom function.] If you use it, you must include the

    Following namespace declaration in your BPEL file.

    < br / > < br / >

    ' xmlns:f17 = ' http://ENTP.HUD.gov/customxpath/functions "" "

    < br / > < br / >

    USE: f17:replaceString(String,String,String,String) < br / >

    Chain change, regular expression, mode [optional] replace the string - 1 = all, 2 = first by default all the < br / >

    See documentation for more details.]] >

    < / details >

    < / feature >

    < / soa-xpath-functions >

    None of the answers was * exactly * correct, but they gave me enough information to solve the problem.

    To implement what I have to code the functions a bit differently.

    • BPEL functions are all the IXpathFunction extension classes.
    • Mapper functions are not.
    • BPEL functions are each separate classes.
    • A single class with a method for each desired function mapper functions.
    • BPEL classes outcrop in the config file ext-bpel-xpath-functions-config. XML
    • The Mapper class is exposed in the config file ext-Mapper-xpath-functions - config.xml

    A BPEL class looks like:

    public class editCaseNumber implements IXPathFunction {
        public Object call(IXPathContext context, List args) throws XPathFunctionException {
           return docOut;
        }
    }
    

    A class to map looks like:

    public class mapperFunctions {
        public static String replaceString(String sIn,String sMat,String sRep,String mode){
            return finalString;
        }
        public static XMLDocumentFragment compressFile(String indoc){
            return docOut;
        }
    }
    

    (I deleted the code of these to avoid confusion.)


    My ext-Mapper-xpath-functions file - config.xml looks like:

    soa-xpath-functions
            xmlns="http://xmlns.oracle.com/soa/config/xpath"
            xmlns:map="http://www.oracle.com/XSL/Transform/java/com.f17.customfunction.mapperFunctions"
            version="11.1.1"
            resourceBundle="oracle.tip.tools.ide.common.resource.IDEMessageBundle"
            >
      
      com.f17.customfunction.mapperFunctions.compressFile
      
      
      
      
      Compresses large strings for DB storage
      
                    
    USE: map:compresFile(string)

    Returns XML document fragment containing HEX binary string:
    <compressedFile$gt;[outPut]</compressedFile> See documentation for details.]]>
    com.f17.customfunction.mapperFunctions.replaceString Exposes replaceFirst and replaceAll java functions
    USE: map:replaceString(String,String,String,String)
    String to edit,
    regular expression,
    replacement string mode
    1 = all
    2 = first occurance
    See documentation for details.]]>


  • Xquery functions using predefined in user defined functions

    Hi all

    I have a requirement to call a function defined by the user in the osb xquery file. That function, I use osb predefined string functions, but they do not work it displays the error message in the file of xquery. Can you please suggest how to use user-defined functions.

    Thank you
    Srinivas.
    xquery version "1.0" encoding "Cp1252";
    
    declare namespace xf = "http://tempuri.org/TransactieService/Xquery/test/";
    
    declare function xf:test($string1 as xs:string)
        as xs:string {
            xf:buildReferenceRange($string1)
    };
    
    declare function xf:buildReferenceRange($inRange as xs:string)
         as xs:string {
         let $filtered :=
              if (contains($inRange,"^"))
              then
                   "it's in"
              else
                   "it's not in"
    
         return $filtered
    }; 
    
    declare variable $string1 as xs:string external;
    
    xf:test($string1)
    

    It works for me

  • Flash Wrapper and access user-defined variables

    I'm working on creating a Flash AS3 wrapper to combine several files cpativate.  I am able to retrieve system variables, but I'm not able to recover the user-defined variables.  I have a variable that is defined by the user in my Captivate called passedScore, in my Flash script, I have the following...

    var mcLesson1:MovieClip;

    btnHit.addEventListener (MouseEvent.CLICK, test);

    var vLoader:Loader = new Loader();

    vLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, swfLoaded);

    vLoader.load (new URLRequest ("untitled1.swf"));

    function swfLoaded(e:Event):void {}

    mcLesson1 = MovieClip (vLoader.contentLoaderInfo.content);

    vLoader.contentLoaderInfo.removeEventListener (Event.COMPLETE, swfLoaded);

    addChild (mcLesson1);

    }

    function test(event:MouseEvent):void

    {

    feedback1. Text = mcLesson1.cpInfoCourseName;

    feedback2. Text = mcLesson1.m_VarHandle.passedScore;

    }

    retroaction1 correctly displays the name of the course, however, for feedback2 it errors saying a term are indefinite (referring to m_VarHandle)

    try to use mcLesson1.cpEIGetValue ('m_VarHandle.passedScore');

  • Using java user-defined aggregate function

    Hello

    I'm trying to implement a with Java user-defined aggregate function.

    Here's the Code Javaclass:

    Import Java.util;
    Oracle.sql import. *;
    import java.sql. *;
    import Java.Math.BigDecimal;
    Oracle import. CartridgeServices.*;

    stored the context type

    public class StoredCtx_SecMax
    {
    private BigDecimal b_max;
    private BigDecimal b_secmax;

    public StoredCtx_SecMax()
    {
    b_max = new BigDecimal (0);
    b_secmax = new BigDecimal (0);
    }

    public void SchreibeMax (entry BigDecimal)
    {
    b_max = entry;
    }

    public void SchreibeSecMax (entry BigDecimal)
    {
    b_secmax = entry;
    }

    public BigDecimal LeseMax()
    {
    Return b_max;
    }

    public BigDecimal LeseSecMax()
    {
    Return b_secmax;
    }
    }

    implementation type

    / public class SecondMax_j implements SQLData
    {
    BigDecimal private key;

    Ultimate SUCCESS of static BigDecimal = new BigDecimal (0);
    Final static BigDecimal ERROR = new BigDecimal (1);


    Implement the SQLData interface.

    String sql_type;
    public String getSQLTypeName() throws SQLException
    {
    Return sql_type;
    }

    ' Public Sub readSQL (SQLInput stream, string typeName) throws SQLException
    {
    sql_type = typeName;
    key = stream.readBigDecimal ();
    }

    Public Sub writeSQL (SQLOutput stream) throws SQLException
    {
    stream.writeBigDecimal (key);
    }


    methods of the type that implements ODCITable interface

    public static BigDecimal ODCIAggregateInitialize (oracle.sql.STRUCT [] sctx)
    throws SQLException
    {
    Connection Conn = DriverManager.getConnection("jdbc:default:connection:");

    create a stored environment and store the result set in it
    StoredCtx_SecMax ctx = new StoredCtx_SecMax();

    context of registry stored with cartridge services
    Touch int;
    try {}
    key = ContextManager.setContext (ctx);
    } catch {} (EC CountException)
    error return;
    }

    Create an instance of StockPivotImpl and store the key of
    Object [] impAttr = new Object [1];
    impAttr [0] = new BigDecimal (key);
    StructDescriptor sd = new StructDescriptor ("SECONDMAX_J", conn);
    SCTX [0] = new STRUCT(sd,conn,impAttr);

    return a SUCCESS;
    }

    public BigDecimal ODCIAggregateIterate (BigDecimal input)
    throws SQLException
    {
    retrieve the context stored with the key
    CTX StoredCtx_SecMax;
    try {}
    CTX = (StoredCtx_SecMax) ContextManager.GetContext (Key.intValue ());
    } catch (InvalidKeyException ik) {}
    error return;
    }

    BigDecimal b_max;
    BigDecimal b_secmax;

    b_max = ctx. LeseMax();
    b_secmax = ctx. LeseSecMax();

    If (eingabe.compareTo (b_max) == 1)
    {
    CTX. SchreibeSecMax (b_max);
    CTX. SchreibeMax (input);
    }
    on the other
    {
    If (eingabe.compareTo (b_secmax) == 1)
    {
    CTX. SchreibeSecMax (input);
    }
    }

    return a SUCCESS;
    }

    public BigDecimal ODCIAggregateTerminate (double [] returnValue, int flags) throws SQLException {}

    retrieve the context stored with the key
    CTX StoredCtx_SecMax;
    try {}
    CTX = (StoredCtx_SecMax) ContextManager.clearContext (Key.intValue ());
    } catch (InvalidKeyException ik) {}
    error return;
    }

    returnValue [0] = ctx. LeseSecMax () .doubleValue ();

    CTX = null;

    return a SUCCESS;
    }


    public BigDecimal ODCIAggregateMerge (oracle.sql.STRUCT ctx2) throws SQLException {}


    return a SUCCESS;
    }
    }


    To implement this in the database, I use the following script:

    CREATE OR REPLACE TYPE IMPROG. SECONDMAX_J as object

    (
    INTEGER key,

    public static function ODCIAggregateInitialize (sctx IN OUT SECONDMAX_J)

    Return number
    IN THE JAVA LANGUAGE
    NAME "Java.Math.BigDecimal return from SecondMax_j.ODCIAggregateInitialize (oracle.sql.STRUCT []).
    ,



    Member ODCIAggregateIterate (self IN OUT SECONDMAX_J function,

    Number return value)
    IN THE JAVA LANGUAGE
    NAME "Java.Math.BigDecimal SecondMax_j.ODCIAggregateIterate return (Java.Math.BigDecimal).
    ,



    Member ODCIAggregateTerminate (self IN SECONDMAX_J function,

    Return returnValue NUMBER, flags in number number)
    IN THE JAVA LANGUAGE
    NAME "Java.Math.BigDecimal return of SecondMax_j.ODCIAggregateTerminate (double [], int).
    ,



    Member ODCIAggregateMerge (self IN OUT SECONDMAX_J function,

    CTX2 IN SECONDMAX_J) return number
    IN THE JAVA LANGUAGE
    NAME "Java.Math.BigDecimal SecondMax_j.ODCIAggregateMerge return (oracle.sql.STRUCT)".
    );
    /

    CREATE OR REPLACE FUNCTION F_SECONDMAX_J (NUMBER value) RETURN NUMBER

    PARALLEL_ENABLE

    AGGREGATION to the HELP of SecondMax_j;
    /



    When I now use the F_SECONDMAX_J function.

    "(Columnname) select F_SECONDMAX_J from Tablename t;

    It works perfectly and shows me the right result.

    Then I tried to implement the fusion part as follows:

    public BigDecimal ODCIAggregateMerge (oracle.sql.STRUCT ctx2) throws SQLException {}

    BigDecimal Key2 = null;

    BigDecimal ctx_max = null;
    BigDecimal ctx_secmax = null;

    BigDecimal ctx2_max = null;
    BigDecimal ctx2_secmax = null;

    retrieve the context stored with the key
    StoredCtx_SecMax ctx = null;
    try {}
    CTX = (StoredCtx_SecMax) ContextManager.GetContext (Key.intValue ());
    } catch (Exception e) {}

    }

    Object [] impAttr = ctx2.getAttributes ();

    Key2 = (BigDecimal) impAttr [0];

    retrieve the second context stored using the key2
    StoredCtx_SecMax ctx_sec = null;
    try {}
    ctx_sec = (StoredCtx_SecMax) ContextManager.GetContext (key2.intValue ());
    } catch (Exception e) {}

    }

    ctx_max = ctx. LeseMax();
    ctx_secmax = ctx. LeseSecMax();

    ctx2_max = ctx_sec. LeseMax();
    ctx2_secmax = ctx_sec. LeseSecMax();

    If (ctx2_max.compareTo (ctx_max) == 1)
    {
    If (ctx2_secmax.compareTo (ctx_secmax) == 1)
    {
    CTX. SchreibeSecMax (ctx2_secmax);
    }
    on the other
    {
    CTX. SchreibeSecMax (ctx_max);
    }
    CTX. SchreibeMax (ctx2_max);
    }
    on the other
    {
    If (ctx2_max.compareTo (ctx_secmax) == 1)
    {
    CTX. SchreibeSecMax (ctx2_max);
    }
    }

    return a SUCCESS;
    }

    When I now try the function

    "Select / * + parallel (t 4) * / F_SECONDMAX_J (Columnname) of Tablename t;

    I always get a pointer NULL-error because the variable key2 is always 0 and therefore the functions LeseMax() and LeseSecMax()
    in the second context 'ctx_sec' produce this error NULL pointer.

    To me it seems that each parallel process is the construction of an additional class for himself, which is not available are my main process.

    My question is now how it is possible to access the context of stored of the parallel process, so that I can combine the results.

    Thank you very much

    Josef

    Hi Josef,

    just guess that I've never implemented with java user-defined aggregate functions or support parallel execution:

    Maybe you have to implement ODCIAggregateWrapContext?

    + Application of ODCIAggregateWrapContext is optional. It should be implemented only when the external memory is used to hold the aggregative, context and the user-defined aggregate is evaluated in parallel (which is, stated as PARALLEL_ENABLE). If the user-defined aggregate is not evaluated in parallel, ODCIAggregateWrapContext is not necessary. +
    [http://docs.oracle.com/cd/B12037_01/appdev.101/b10800/dciaggfns.htm#i1004974]

    Report it to progress and success.

    Good luck
    Rainer Stenzel

  • Collections and user-defined objects

    Hello

    I try to use collections of user-defined object type, I am facing a problem here.

    The code below works well with the object varray straight forward.

    declare
    Typ_derv1 TYPE is varray (2) of varchar2 (100);

    v_test1 typ_derv1: = typ_derv1();
    Start

    v_test1.extend (1);

    v_test1 (1): = ' ID' 1 ';

    dbms_output.put_line (v_test1 (1));
    end;
    /

    CREATE OR REPLACE TYPE TYP_TEST1 AS OBJECT)
    ATTR_ID VARCHAR2 (10),
    ATTR_NAME VARCHAR2 (20)
    )
    /

    «The script below gives ' ORA-06530: composite unitialized reference "error message to the statement" v_test1 (1).» ATTR_ID: = ' ID' 1 ';

    declare
    Typ_derv1 TYPE is varray (2) of TYP_TEST1; GOLD TYPE typ_derv1 is table of the TYP_TEST1;

    v_test1 typ_derv1: = typ_derv1();
    Start

    v_test1.extend (1);

    v_test1 (1). ATTR_ID: = ' ID' 1 ';
    v_test1 (1). ATTR_NAME: = "Name1"


    dbms_output.put_line (v_test1 (1).) ATTR_ID | ', ' || v_test1 (1). ATTR_NAME);
    end;
    /

    But, when I give something like that, it works well, but is not a real collector's item so, it maintains just a variable with attributes structure.

    declare
    v_test1 TYP_TEST1: = TYP_TEST1 ("ID 1', 'Name1');
    Start

    dbms_output.put_line (v_test1. ATTR_ID | ', ' || v_test1. ATTR_NAME);
    end;
    /

    I tried like this, it gives me the same ' ORA-06530: reference to the composite unitialized' error in the statement "v_test1 (1).» ATTR_ID: = ' ID' 1 ';

    CREATE OR REPLACE TYPE TYP_COLL_TEST1 AS TABLE TYP_TEST1;

    declare
    v_test1 TYP_COLL_TEST1: = TYP_COLL_TEST1();
    Start

    v_test1.extend (1);

    v_test1 (1). ATTR_ID: = ' ID' 1 ';
    v_test1 (1). ATTR_NAME: = 'NAME 1';

    dbms_output.put_line (v_test1 (1).) ATTR_ID | ', ' || v_test1 (1). ATTR_NAME);
    end;
    /

    I tried something like this and it works,

    declare
    v_test1 TYP_COLL_TEST1;
    Start

    v_test1: = TYP_COLL_TEST1 (TYP_TEST1 ("ID 1', '1 NAME'), TYP_TEST1 ("ID 2', '2 NAME'));

    dbms_output.put_line (v_test1 (1).) ATTR_ID);
    dbms_output.put_line (v_test1 (1).) ATTR_NAME);

    dbms_output.put_line (v_test1 (2).) ATTR_ID);
    dbms_output.put_line (v_test1 (2).) ATTR_NAME);

    end;
    /

    But when I want to use something like that, I couldn't do it, I'm going in circles.

    vtest1.extend; _

    vtest1 (3): = TYP_COLL_TEST1 (TYP_TEST1 ("ID 'NAME 3' 3')); _

    vtest1 (3). ATTR_ID: = ' ID 3'; " _
    vtest1 (3). ATTR_NAME: = "NAME 3';" _

    Please give me some examples about handling this requirement, in particular objects defined by the user with collections as a VARRAY, nested Table and associative arrays, thank you.

    Frank Kulash, it would be better if you could give some explanations and examples.

    Only can Frank help? Or I'll make?

    Try

    declare
    v_test1 TYP_COLL_TEST1 := TYP_COLL_TEST1();
    begin
    
    v_test1.extend(1);
    v_test1(1) := typ_test1('ID 1', 'NAME 1');
    /*v_test1(1).ATTR_ID := 'ID 1';
    v_test1(1).ATTR_NAME := 'NAME 1';*/
    
    dbms_output.put_line(v_test1(1).ATTR_ID || ', ' || v_test1(1).ATTR_NAME);
    end;
    / 
    

    or

    declare
    v_test1 TYP_COLL_TEST1 := TYP_COLL_TEST1();
    begin
    
    v_test1.extend(1);
    v_test1(1) := typ_test1(null,null);
    v_test1(1).ATTR_ID := 'ID 1';
    v_test1(1).ATTR_NAME := 'NAME 1';
    
    dbms_output.put_line(v_test1(1).ATTR_ID || ', ' || v_test1(1).ATTR_NAME);
    end;
    / 
    

    Published by: Paul Horth on March 8, 2012 07:01

  • the user-defined function

    Hi, experts,
    I wrote a sql query to get the amount after calculation.

    SELECT A.FORM_NO, C.SKUCODE, B.QUANTITY * (
    CASE WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = 2008 THEN 
    TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM'))  +1 
    WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > 2008 THEN
    12- TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1
    WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = 2008 THEN 
    TO_NUMBER(TO_CHAR(A.END_DATE,'MM'))
    WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > 2008 THEN
    12 ELSE 0 END )/((TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) - TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY'))) *12 + TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1 )
    
    AS QUAN
    FROM FORM_TBL A, QUANTITY_TBL B, SKU_TBL C
    WHERE A.FORMNO = B.FORMNO AND B.SKU = C.SKU;
    It runs correctly, and no error returned.


    I would change for a user-defined function.

    create or replace
    function get_quantity
            (pi_year number, pi_year_diff number, pi_form_no varchar2, pi_skucode varchar2)
            return number is
        po_quantity number;
    begin
        
        
        SELECT ( B.QUANTITY * (
        CASE WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = (pi_year + pi_year_diff) THEN 
        TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM'))  +1 
        WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > (pi_year + pi_year_diff) THEN
        12- TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1
        WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = (pi_year + pi_year_diff) THEN 
        TO_NUMBER(TO_CHAR(A.END_DATE,'MM'))
        WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > (pi_year + pi_year_diff) THEN
        12 ELSE 0 END )/((TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) - TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY'))) *12 + TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1 ))
        
        into po_quantity
        FROM FORM_TBL A, QUANTITY_TBL B, SKU_TBL C
        WHERE A.FORMNO = B.FORMNO AND B.SKU = C.SKU
        and c.skucode = pi_skucode and a.form_no = pi_form_no;
    return po_quantity;
    end;
    BUT IT CANNOT BE COMPILIED.
    The error is a recursive sql error

    ORA-00604: an error has occurred at the SQL level 1 recursive

    I think that there is no syntax error.

    What is the reason?

    Thank you very much!

    What is your DB version. If you are using 11g then can be consider that

    http://www.DBA-Oracle.com/sf_ora_00604_error_occurred_and_recursive_sql_level_string.htm

Maybe you are looking for

  • Gibberish at the top of the page when printing messages

    When I print an e-mail message, it prints a few lines of gibberesh at the top. I tried different messages with the same result. It is not part of the message I read when I view the message. I have a snapshot, but I don't see a way to join a.

  • Reminders to reappear

    My operating system is up-to-date, iPhone 6plus. I had clear my reminders several times a day. For example, I had an appointment yesterday. I put my application of reminder to remind me of him an hour before. The time has come and it reminded me, I e

  • A100-165 ethernet controller driver

    can someone who has the a100-165 psaa9 give me the name of the ethernet controller? I have download the drivers of th on the site but I don t have any idea of who we are the one that I've tried to give o code 10 error message.Thank you for your help

  • Build 7601 not authentic

    I bought a laptop on eBay a month ago (I know, I know, but my old one dies), and after a week or two, I started to receive messages on my copy of Windows is not legitimate No. The key is displayed in the properties does not match the one on the COA s

  • Problem with Invoke email

    Hello guys, I have problami with InvokeActionItem InvokeActionItem { title: qsTr("Email") imageSource: "asset:///images/ic_email.png" ActionBar.placement: ActionBarPlacement.OnBar query { invokeTargetId: "sys.pim.uib.email.hybridcomposer" invokeActio