How to use WinAppRegisterInterface call?

Hi,
I'm trying to implement some COM support into my plug-in and access that functionality via GetInterface() method, so that plug-in is loaded already into the Acrobat host application and could utilize for example Cos layer functions.
For that to work I'm trying to fill COMServerRec structure in form like that:
ComServerRec comServer;
comServer.size = GetNameLength();
comServer.GetName = &GetName;
comServer.GetIDispatch = &GetIDispatch;
BOOL res = WinAppRegisterInterface(&comServer);
where GetNameLength() returns the lengths of my plugin's name, let say of "CompanyName:TestPlugin" and GetName/GetIDispatch are my defined functions.
So, that call always returns me false and I'm not sure what is wrong, cause there is no documentation on size field and any sample as well.
Currently I'm trying that with Adobe Acobat 8.0 Pro, but later I'd like to use that with v9 as well.
Any help would be highly appreciated.
Andrejus

Hangouts is AWFUL!! Quality of video is ZERO - also sound quality is Zero - just couldn´t make out of words! Skype has video quality about the same as iPhone´s FaceTime. I wonder if anyone using Hangouts - at least their ad is BS - they used other app than Hangouts. So blur and jerky video in Hangouts - it is really substandard - same bad as Line video call. Fortunately Skype is good to go - otherwise would have said good bye to Android. Skype messaging is OK but pictures couldn´t be sent with it - it´s gonna load a picture week or two - really awful - only text goes quickly. Seems like Apple is king - they have their own messaging (iMessage) - no matter picture or text it´s fast like a NATO missle and their FaceTime works smoothly and the video is sharp. Yes I tested Hangouts, Skype and FaceTime one after each others many times and results were the same every time, so you can´t blame internet connection.
I got the good results as follows:
Video calls: Skype
Messaging: Line and Whatsapp
SMS: Sony´s own app

Similar Messages

  • "HOW to use Labview call Dll compiled by VC++"

    "hello,I use VC++ compile a DLL,and i want to call DLL Function in LABVIEW program.But there is a dll function
    when i call it in labview.There is error.The prototype of Dll Function that make error is "USHORT DLLFUN __stdcall IBWRT(unsigned short dev_address,const char *pstrWrite)",The second paramenter is a char pointer,
    and the paramenter pass a command which content is
    "MEASURE:CURRENTC? 1A,0.001MA".
    When i use VC++ to call this function,i program followed:
    CString m_wrt;
    int ReturnW;
    m_wrt="MEASURE:CURRENTC? 1A,0.001MA";
    char buffer[40];
    strcpy(buffer,m_wrt);
    ReturnW=IBWRT(4,buffer);
    and this call is correct.
    But when i use labview to call this function.ther
    e is
    error.So, who can help me,to tell me how to call this
    function.Thanks."

    Are you asking about porting code or calling C++ code in LabVIEW?  As far as porting code, there's no easy way to move code back and forth between LabVIEW and C++.  However, if you are trying to call C++ code in LabVIEW, you can compile it as a DLL and call it in LabVIEW using the Call Library Function node.
    Chad B. » National Instruments » ni.com

  • How to use system call in assembler

    I write codes to display the dictionary using C,
    and it can run well,and then I want to use system call
    in assembler to realize the same function ,but it doesn't
    display the dictionary,how to correct it?
    Look:
    //C
    #include <stdio.h>
    int main()
    char *name[2];
    name[0]="/bin/ls";
    name[1]=NULL;
    execve(name[0],name,NULL);
    return 0;
    //Assembler
    .data
    msg:.string "/bin/ls"
    .text
    .global _start
    _start:
    movl $0xb,%eax
    movl $msg,%ebx
    mov $msg,%ecx
    movl $0,%edx
    int $0x80
    movl $1,%eax
    movl $0,%ebx
    int $0x80

    If you compile with -Wwrite-strings, as I like to do for new code, you'll notice it warns about assigning the address of read-only memory to a plain char *. You might want to declare name as follows to avoid accidentally trying to modify it:
    char const *name[2];
    But as for your question. The execve system call requires a pointer to a list (array) of pointers to strings in %ecx. You are passing it a pointer to a single string, which means it will try to interpret the string ("/bin/ls")as a series of pointers to strings, with potentially disastrous (and certainly weird) results.
    Last edited by Trent (2012-12-28 15:31:38)

  • How to use RIDC calls in webcenter application

    hi,
    We have lot of portlets developed in weblogic portal and consuming content using RIDC calls. How to consume data from UCM repository (site studio pages) in Webcenter JSF pages.
    Thanks
    Manu

    Hi Manu,
    Take a look at our whitepaper - Integrating Oracle ECM with Portal Technologies.
    We showed this integration at the recent Collaborate Conference in April.
    link: http://www.fishbowlsolutions.com/StellentSolutions/ContentManagementResources/index.htm
    Warmly,
    Billy Cripe
    Fishbowl Solutions

  • ? how to use something called quicktime. i click on its icon and it does nothing! i just bought quicktime 7 pro and have a registration

    i just bought a macbook pro and never used apple before. i am trying to convert my movie clips and need to use something called quicktime. i click on its icon and it does nothing! i just bought quicktime 7 pro and have a registration # and it says open quicktime and enter the reg# - how do i do this?

    When you start QT 7 player, under the first menu there is a "Registration" menu item.
    Enter your name and Registration code, THEN hit the TAB KEY. Do not click the "Buy..." button.
    That should do it.
    Make sure you have the CORRECT version of QT 7:
    http://support.apple.com/kb/HT3678

  • How To use or call dll ?????

    Hi !
    I have created one programm and i have genetared dll of that ( Using
    LabVIEW) now i want to call that from vb.net how i can Do it
    please help
    Thanks in advance

    tst wrote:
    Lycangeek wrote:
    But you can't get a front panel control integrated into a VB.NET panel.
    Brian,
    this is obviously impossible when the control is part of a running
    program, but don't the LV style control appear in the list of
    registered ActiveX controls as ComponentWorks controls? I'm
    not near a computer with LV at the moment to check.
    No
    almost all LabVIEW controls are native implementations in LabVIEW
    itself. They have nothing to do with Component Works or Active X at
    all, although I guess the Component Works developers did get some
    inspiration from LabVIEW controls but even more probably from
    LabWindows/CVI controls.
    Exception to this is the 3D graph which is a Component Works control
    incorperated into LabVIEW through the Active X control container (and
    my own private opinion about this control is that it sucks in several
    aspects, being an Active X control is not the least of its faults).
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to use  or call component in custom script expression

    i want to use component in custom script expression .(custom script expression is located at :
    when yow will click on one of the steps in criteria workflow
    1)there is a tag named as event on clicking the event tag,there are two buttons named edit and clear on clicking edit.there is a screen having custom as a tag,on clicking that tag there is written custom script expression, here i hav to write a code to include a component).

    you can define code in a component (a service or an IDOC Include) that you can then call from the workflow "custom" tab.
    So if your component has an include like this:
    <@dynamichtml myInclude@>
    <$do Some Stuff$>
    <@end@>
    Then in your workflow step event "custom" tab you can write:
    <$include myInclude$>
    The workflow event will then execute the <$do Some Stuff$> line.
    With a service, you would define the service in your component then call <$executeService("MYService")$> in the step event custom code.
    You cannot define includes or services in the custom script tab for workflow.

  • How to use sql call a pl/sql function

    Hi there,
    I have a pl/sql function package as below:
    Create or Replace package test10 as
    P_DESFORMAT VARCHAR2(10);
    DESFORMAT VARCHAR2(10);
    function m_tot_u1Formula(m_o_uns number,m_t_uns number,m_v_uns number)return NUMBER ;
         function m_tot_res1Formula(m_o_res number,m_t_res number)return NUMBER;
         function m_occ_u1Formula(m_o_uns number,m_t_uns number)return NUMBER ;
         function m_onrpun1Formula(m_o_uns in number,m_o_res in number)return NUMBER ;
         function m_tenpun1Formula(m_t_res in number,m_t_uns in number)return NUMBER ;
         function m_occpun1formula(m_occ_u in number, m_tot_res in number) return number ;
         function m_vac_rate1formula(m_v_uns in number,m_tot_u in number) return number;
         function m_onrpha1Formula(m_o_res in number,m_area in number) return NUMBER;
         function m_tenpha1Formula(m_t_res in number,m_area in number)return NUMBER ;
         function m_occpha1Formula(m_area in number,m_tot_res in number)return number;
         function P_DESFORMATValidTrigger return boolean;
    END test10;
    CREATE OR REPLACE PACKAGE BODY test10 AS
    function m_tot_u1Formula(m_o_uns number,m_t_uns number,m_v_uns number)return NUMBER is
    begin
    RETURN m_o_uns + m_t_uns + m_v_uns;
    end;
    function m_tot_res1Formula(m_o_res number,m_t_res number)return NUMBER is
    begin
    RETURN m_o_res + m_t_res;
    end;
    function m_occ_u1Formula(m_o_uns number,m_t_uns number)return NUMBER is
    begin
    RETURN m_o_uns + m_t_uns;
    end;
    function m_onrpun1Formula(m_o_uns in number,m_o_res in number)return NUMBER is
    begin
    IF m_o_uns > 0 THEN
    RETURN m_o_res / m_o_uns;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_tenpun1Formula(m_t_res in number,m_t_uns in number)return NUMBER is
    begin
    IF m_t_uns > 0 THEN
    RETURN m_t_res/m_t_uns;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_occpun1formula(m_occ_u in number,m_tot_res in number) return number is
    begin
    IF m_occ_u > 0 THEN
    RETURN m_tot_res / m_occ_u;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_vac_rate1formula(m_v_uns in number,m_tot_u in number) return number is
    begin
    IF m_tot_u > 0 THEN
    RETURN 100 * m_v_uns / m_tot_u;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_onrpha1Formula(m_o_res in number,m_area in number) return NUMBER is
    begin
    IF m_o_res > 0 THEN
    RETURN m_o_res / m_area;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_tenpha1Formula(m_t_res in number,m_area in number)return NUMBER is
    begin
    IF m_t_res > 0 THEN
         RETURN m_t_res / m_area;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function m_occpha1Formula(m_area in number,m_tot_res in number)return number is
    begin
    IF m_area > 0 THEN
    RETURN m_tot_res / m_area;
    ELSE
         RETURN NULL;
    END IF;
    end;
    function P_DESFORMATValidTrigger return boolean is
    begin
    DESFORMAT := P_DESFORMAT;
    return (TRUE);
    end;
    END test10 ;
    the package is compiled successfully.
    And my sql statement will call those function in this package such as:
    select test10.m_tot_u1Formula(m_o_uns ,m_t_uns ,m_v_uns) m_tot_u,
    test10.m_tot_res1Formula(m_o_res,m_t_res)m_tot_res,
    test.m_occ_u1Formula(m_o_uns ,m_t_uns)m_occ_u,
    test10.m_onrpun1Formula(m_o_uns ,m_o_res )m_onrpun,
    test10.m_tenpun1Formula(m_t_res ,m_t_uns )m_tenpun,
    test10.m_occpun1formula(:m_occ_u , :m_tot_res )m_occpun,
    test10.m_vac_rate1formula(m_v_uns ,m_tot_u ) m_vac_rate,
    test10.m_onrpha1Formula(m_o_res ,m_area ) m_onrpha,
    test10.m_tenpha1Formula(m_t_res ,m_area ) m_tenpha,
    test.m_occpha1Formula(m_area , :m_tot_res ) m_occpha
    from ..... where.....
    Is it right to call those functions? Thanks in advance.
    Appcat

    I spoke too soon on the impracticality of a function-based index on a view. My recollection was that the CBO wasn't smart enough to recognize that a FBI on an expression like (col1*col2) could be used to resolve queries that involved a simple transform (i.e. col2*col1), which tended to force you to have a user-defined function behind the FBI to make sure that someone cleaning up code didn't accidentally make the index unusable. Now that I've actually tested it, my recollection, at least on 10.2, is clearly incorrect.
    There's certainly a matter of personal taste here. If I knew what these variables were intended to represent, I'd have no problem maintaining either syntax because it should be relatively obvious whether either piece of code is suspect. I do have to confess that I had to look up the syntax for the NULLIF function yesterday in order to reply to this thread-- my wager is that if I had to look it up, a good fraction of the PL/SQL programmers out there would have had to look it up as well and might not immediately recognize this as an inverted division by 0 test.
    From a maintenance standpoint, I would personally rather have the package where I can zoom in on the particular function I'm interested in, rather than looking at a view that may be doing a dozen rather similar calculations. I'm a bit more confident that I (or some new maintenance programmer on my team) could change the logic in the function without inadvertently screwing up any of the other functions in the package than I would be that I (or they) would accidentally screw up the view. Clearly, robust test scripts and an automated test suite would help tremendously in either case, and neither change should be too difficult, but my experience is that the package is the easier construct to modify or add to. I certainly believe that other people/ organizations would have different experiences and other people might prefer the view approach. I certainly wouldn't oppose a view-based approach, just as I wouldn't oppose a package.
    There's also still the matter of having a table with every valid input if a view is to be practical. It's certainly possible that such a table exists, but it seems equally possible that there are either many such tables, that these functions are doing calculations on values that aren't stored in tables, etc., in which case a package would be the better solution.
    Justin

  • How to use/consume/call a webservice

    Hello All,
        I have created a webservice from the inbound proxy. i can test this using tcode wsadmin.
      but i donno how to consume this service.
    for eg: i ahve created a PurchseOrderCreate webservice now i wnat to use this serivce to create PO.
    can usomeone please tell the procedure?
    Thanks & Regards
    Amarener Reddy B

    Amarender,
    sorry to say that, but your question is rather strange.
    it seems you do not have any concrete requirement or use case at all.
    such a requirement would for instance be:
    I have system A and a system B, latter being my SAP system. I want to allow system A to create purchase orders in my system B my means of webservices.
    to achieve this you
    1) enable system B by creating a suitable webservice, e.g. PurchaseOrderCreate
    2) test the webservice on system B and make sure it works well
    3) create a webservice consumer on system A using the tools of that system's development environment
    4) run the consumer on system A and transmit a purchase order to system B
    it seems you have sucesfully performed 1) & 2) and now recognize you don't have any specific requirement at all, most of all no system A.
    <i>Thou shalt not offer a service if you don't know anyone to use it...(Konfuzius)</i>

  • How to use HOST call DOS continuous running problem but NOT hold Forms scre

    In my Forms, I have a Button a start a MP3 recorder program to record voice, I use HOST command to init the program successfully. However, since the MP3 recorder program in continuous running, the HOST command hold my Forms screen until the MP3 program stop.
    I have try to use Open_form to open another form to start this MP3 program. It still hold the whole Forms system.
    Is there any solution to start a continuous running DOS program but NOT hold the Forms screen?
    Thank You !

    You didn't provide your host-command, so i simply guess its something like
    HOST('"c:\Program Files\mp3.exe" someoptions');instead of calling the program directly, you could use a commadn batch along with the start-command, for this should launch the program asynchronously:
    HOST('cmd /c start "c:\Program Files\mp3.exe" someoptions');hope this helps.

  • How to use an authenticated user for a proxy call

    Dear all,
    I am currently working on a JEE application where the user needs to authenticate (for this I have configured the web.xml).
    Now inside this application I need to do a proxy call to a PI webservice.
    I would like to use the user credentials of the already logged in user in order to call the proxy.
    What I don't want to do is to use a service user for the proxy call.
    The code I am trying to call looks something like this:
         private IntegratedConfigurationIn getPort() throws Exception{
              IntegratedConfigurationIn port = null;
              try {
                   IntegratedConfigurationInService service = null;
                   service = new IntegratedConfigurationInService();
                   port = (IntegratedConfigurationIn) service.getIntegratedConfigurationIn_Port();
                  BindingProvider bp = (BindingProvider)port;
                  bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, user);
                  bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
                  if (url.length() != 0)
                       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
              catch (Exception ex){
                   ex.printStackTrace();
              return port;
    The examples I found to retrieve the userdata pointed to codes similar to this one:
    public HttpServletRequest getHttpRequest() throws Exception {
              // Get runtime context
              Properties props = new Properties();
              props.put("domain", "true");
              Context initialContext = new InitialContext(props);
              ApplicationWebServiceContext wsContext = (ApplicationWebServiceContext) initialContext
                        .lookup(" /wsContext/ApplicationWebServiceContext");
              HttpServletRequest req = wsContext.getHttpServletRequest();
              return req;
    com.sap.security.api.IUser sapUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser(getHttpRequest(), null);
              IUser ep5User = com.sapportals.wcm.util.usermanagement.WPUMFactory.getUserFactory().getEP5User(sapUser);
    Now I don't know how to bring it togehter and how to use an authenticated user for the BindingProvider.
    I would appreciate any hints or ideas.

    Peter,
    from the first screenshot, what I understood is that, you are calling an inbound PI web service that is intended to create an integrated configuration object (this is used for whole lot of other reason completely) but not actually calling a development web service.
    For this, you would have to generate your client classes from the WSDL provided by the PI developer for that particular service. Once you get those client classes generated, you could used the method provided in the other screenshot to extract the user and password and call the intended web service.
    Vijay Konam

  • How to use the place call step in the script

    I am new to uccx and the document does not explain alot for me related to this step so much.
    In the destination field : i use a  variable of string that matched before.
    The call contol group id : i use the integer of 2 ,the same as configured in the call control group number on UCCXadmin page.
    Dialog group: the same as call control group id.
    Here is my problem,the call contact field.
    If i create a variable of contact with value null and choose it in the contact field of the place a call.
    Call is not placed to the extension.
    Also with reactive debug : i see that this field should get filled with a value to make the call works,but i don't know how to use it.
    Thanks in advance.

    1. I'm not sure what you are asking.  Do you want to enter in all of the holidays for the next 10 years?
    2. For this specific date literal example, you can find it in the scripting volume 3.
    Here is the excerpt from the documentation on date literals:
    Date Literals
    The date literal is always of type Date. The following are the  different syntax formats you can use to enter a date.
    DateLiteral:
         DateDeclarator [n o w ]
         DateDeclarator [DateDesignator TimeDesignatoropt]
    DateDeclarator [ DateDesignator TimeDesignatoropt ]
    DateDeclarator: one of
         d D
    DateDesignator:
         FullDatePattern:
                Defined by the pattern "EEEE, MMMM d, yyyy"
         LongDatePattern:
                Defined by the pattern "MMMM d, yyyy"
         MediumDatePattern:
                Defined by the pattern "MMM d, yyyy"
         ShortDatePattern:
                Defined by the pattern "M/d/yy"
    TimeDesignator:
         FullTimePattern:
                Defined by the pattern "h:mm:ss a z"
         LongTimePattern:
                Defined by the pattern "h:mm:ss a z"
         MediumTimePattern:
                Defined by the pattern "h:mm:ss a"
         ShortTimePattern:
                Defined by the pattern "h:mm a"
    Example Date Literals:
    D[12/13/52]
    D[Dec 13, 1952]
    D[Thu, July 4, 2002]
    D[July 5, 2002]
    D[July 7, 2002]
    D[7/6/02]
    D[Thu, July 4, 2002 5:59 PM]
    D[July 5, 2002 5:59 PM]
    D[July 7, 2002 5:59 PM]
    D[7/6/02 5:59 PM]
    D[Thu, July 4, 2002 12:23:59 AM]
    D[July 5, 2002 12:23:59 AM]
    D[July 7, 2002 12:23:59 AM]
    D[7/6/02 12:23:59 AM]
    D[Thu, July 4, 2002 12:23:59 AM CST]
    D[July 5, 2002 12:23:59 AM CST]
    D[July 7, 2002 12:23:59 AM CST]
    D[7/6/02 12:23:59 AM CST]
    D[now]
    Details for the date and time patterns are available in the  documentation of the java.text.DateFormat class. If the string now is used, then  the literal corresponds to the current date in the server's default timezone at  the time the literal is evaluated for the first time.
    Each date literal is a reference to an instance of class  java.util.Date.
    Copyright © 2002-2010, Cisco Systems, Inc. All rights  reserved.
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • SOLVED: How can I use or call a function that returns %ROWTYPE?

    Hi
    edit: you can probably skip all this guff and go straight to the bottom...In the end this is probably just a question of how to use a function that returns a %rowtype.  Thanks.
    Currently reading Feuerstein's tome, 5th ed. I've downloaded and run the file genaa.sp, which is a code generator. Specifically, you feed it a table name and it generates code (package header and package body) that will create a cache of the specified table's contents.
    So, I ran:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\OPP5.WEB.CODE\OPP5.WEB.CODE\genaa.sp"
    749  /
    Procedure created.
    HR@XE> exec genaa('EMPLOYEES');which generated a nice bunch of code, viz:
    create or replace package EMPLOYEES_cache is
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE) return HR.EMPLOYEES%ROWTYPE;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE) return HR.EMPLOYEES%ROWTYPE;
        procedure test;
    end EMPLOYEES_cache;
    create or replace package body EMPLOYEES_cache is
        TYPE EMPLOYEES_aat IS TABLE OF HR.EMPLOYEES%ROWTYPE INDEX BY PLS_INTEGER;
        EMP_EMP_ID_PK_aa EMPLOYEES_aat;
        TYPE EMP_EMAIL_UK_aat IS TABLE OF HR.EMPLOYEES.EMPLOYEE_ID%TYPE INDEX BY HR.EMPLOYEES.EMAIL%TYPE;
        EMP_EMAIL_UK_aa EMP_EMAIL_UK_aat;
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMPLOYEE_ID_in);
            end;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMP_EMAIL_UK_aa (EMAIL_in));
            end;
        procedure load_arrays is
            begin
                FOR rec IN (SELECT * FROM HR.EMPLOYEES)
                LOOP
                    EMP_EMP_ID_PK_aa(rec.EMPLOYEE_ID) := rec;
                    EMP_EMAIL_UK_aa(rec.EMAIL) := rec.EMPLOYEE_ID;
                end loop;
            END load_arrays;
        procedure test is
            pky_rec HR.EMPLOYEES%ROWTYPE;
            EMP_EMAIL_UK_aa_rec HR.EMPLOYEES%ROWTYPE;
            begin
                for rec in (select * from HR.EMPLOYEES) loop
                    pky_rec := onerow (rec.EMPLOYEE_ID);
                    EMP_EMAIL_UK_aa_rec := onerow_by_EMP_EMAIL_UK (rec.EMAIL);
                    if rec.EMPLOYEE_ID = EMP_EMAIL_UK_aa_rec.EMPLOYEE_ID then
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup OK');
                    else
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup NOT OK');
                    end if;
                end loop;
            end test;
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /which I have run successfully:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\EMPLOYEES_CACHE.sql"
    Package created.
    Package body created.I am now trying to use the functionality within the package.
    I have figured out that the section
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /is the initialization section, and my understanding is that this is supposed to run when any of the package variables or functions are referenced. Is that correct?
    With that in mind, I'm trying to call the onerow() function, but it's not working:
    HR@XE> select onerow(100) from dual;
    select onerow(100) from dual
    ERROR at line 1:
    ORA-00904: "ONEROW": invalid identifier
    HR@XE> select employees_cache.onerow(100) from dual;
    select employees_cache.onerow(100) from dual
    ERROR at line 1:
    ORA-06553: PLS-801: internal error [55018]
    HR@XE> select table(employees_cache.onerow(100)) from dual;
    select table(employees_cache.onerow(100)) from dual
    ERROR at line 1:
    ORA-00936: missing expressionHe provides the code genaa.sp, and a very brief description of what it does, but doesn't tell us how to run the generated code!
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    So I try wrapping the call in an exec:
    HR@XE> exec select employees_cache.onerow(100) from dual;
    BEGIN select employees_cache.onerow(100) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement
    HR@XE> exec select table(employees_cache.onerow(100)) from dual;
    BEGIN select table(employees_cache.onerow(100)) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 14:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    HR@XE> exec employees_cache.onerow(100)
    BEGIN employees_cache.onerow(100); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00221: 'ONEROW' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredNo joy.
    Of course, now that I'm looking at it again, it seems that the way to go is indicated by the first error:
    PLS-00428: an INTO clause is expected in this SELECT statement
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    I've had a stab at this, but still, no joy:
    create or replace procedure testcache is
        emp employees%rowtype;
        begin
            select employees_cache.onerow(100) from dual into emp;
            dbms_output.put_line('Emp id: ' || emp.employee_id);
        end testcache;
    show errors
    HR@XE> @testcache.sql
    Warning: Procedure created with compilation errors.
    Errors for PROCEDURE TESTCACHE:
    LINE/COL ERROR
    4/9      PL/SQL: SQL Statement ignored
    4/54     PL/SQL: ORA-00933: SQL command not properly ended
    HR@XE>Have a feeling this should be really easy. Can anybody help?
    Many thanks in advance.
    Jason
    Edited by: 942375 on 08-Feb-2013 11:45

    >
    Ha, figured it out
    >
    Hopefully you also figured out that the example is just that: a technical example of how to use certain Oracle functionality. Unfortunately it is also an example of what you should NOT do in an actual application.
    That code isn't scaleable, uses expensive PGA memory, has no limit on the amount of memory that might be used and, contrary to your belief will result in EVERY SESSION HAVING ITS OWN CACHE of exactly the same data if the session even touches that package.
    Mr. Feuerstein is an expert in SQL and PL/SQL and his books cover virtually all of the functionality available. He also does an excellent job of providing examples to illustrate how that functionality can be combined and used. But the bulk of those examples are intended solely to illustrate the 'technical' aspects of the technology. They do not necessarily reflect best practices and they often do not address performance or other issues that need to be considered when actually using those techniques in a particular application. The examples show WHAT can be done but not necessarily WHEN or even IF a given technique should be used.
    It is up to the reader to learn the advantages and disadvantages of each technicalogical piece and determine when and how to use them.
    >
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    >
    That is correct. To be used by SQL you would need to create SQL types using the CREATE TYPE syntax. Currently that syntax does not support anything similar to %ROWTYPE.
    >
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    >
    NO! That is a common misconception. Each session has its own set of package variables. Any session that touches that package will cause the entire EMPLOYEES table to be queried and stored in a new associative array specifically for that session.
    That duplicates the cache for each session using the package. So while there might be some marginal benefit for a single session to cache data like that the benefit usually disappears if multiple sessions are involved.
    The main use case that I am aware of where such caching has benefit is during ETL processing of staged data when the processing of each record is too complex to be done in SQL and the records need to be BULK loaded and the data manipulated in a loop. Then using an associative array as a lookup table to quickly get a small amount of data can be effective. And if the ETL procedure is being processed in parallel (meaning different sessions) then for a small lookup array the additional memory use is tolerable.
    Mitigating against that is the fact that:
    1. Such frequently used data that you might store in the array is likely to be cached by Oracle in the buffer cache anyway
    2. Newer versions of Oracle now have more than one cache
    3. The SQL query needed to get the data from the table will use a bind variable that eliminates repeated hard parsing.
    4. The cursor and the buffer caches ARE SHARED by multiple sessions globally.
    So the short story is that there would rarely be a use case where ARRAYs like that would be preferred over accessing the data from the table.

  • I want to know what's the conference call in community level and how to use it

    i want to know what's the conference call in community level and how to use it

    Welcome to Apple Support Communities
    Conference calls are got when you reach level 4. Sometimes, ASC hosts may do a conference call about something related to Apple Support Communities. You will be notified through mail or through the "Using Apple Support Communities" forum.
    The last community calls were only for level 6 and higher users, so it's possible that you don't get invited to any until you reach level 6

  • How to I get my Canon MX700 to scan to my new iMAC top? Currently the Canon will print from the iMAC. They are on a wireless home network. The Canon use to scan to the PC using software called MP or Navigator.

    How do I get my Canon MX700 to scan to my new iMAC top? Currently the Canon will print from the iMAC. They are on a wireless home network. The Canon use to scan to the PC using software called MP Navigator.

    Did you try scanning using Image Capture?
    Otherwise, check the Canon website for updated software.

Maybe you are looking for

  • [SOLVED]Kdm won't start

    I installed kdebase to use KDM as a login manager for Fluxbox, and I added it to my daemons in rc.conf. It worked fine the first time around, in 800x600 resolution, but then I remembered that I hadn't configured Xorg yet. So I did Xorg -configure, pu

  • Error in Certificate Management tab in OCA Admin page

    I am following the instructions from this document in the process of getting the Oracle Portal configured with SSL: http://www.oracle.com/technology/obe/obe_as_10g/im/sslohs/ssl_ohs.htm In particular, in the section: "Approve the Server Certificate R

  • SunRay multihead display cloning

    Hey you all.. I have 6 Sun Ray 150 terminals and a Sunray server. I want to have one master terminal and 5 slaves where the screen images from the master is cloned to alle the slaves so if at move the mouse on the master it also moves on the slaves e

  • Show both Moving Average and Standard Price of an item in Report Composer

    Hello I do follow all my items at standard price. But i wish to get on the same report both the standard price and the moving average price. How can i do so : 1 - either by a default report 2 - Or by using report composer 3 - By using a SQL Query Tha

  • A user granted with alter user privilege

    Dear all i have granted a user with create user, alter user system privilege so that he can create or alter users. But i found the user is able to alter the sys and system also. Tell me how to restrict the user so that he can not effect sys and syste