Getting REF from object

Hi guys !
There is a part of code:
declare
p1 tp_permission; -- my type !
p1_ref ref tp_permission;
begin
select treat(t.p as tp_permission) into p1 from tbl_permissions t where t.p.id = 1; -- OK !!!!!
select ref(p1) into p1_ref from dual; -- here rises
exception !!!
end;
Exception like that:
"inconsistent datatypes: expected TP_PERMISSION got
REF TP_PERMISSION".
Why !? I need in REF.
Thanx in advance.

Dirk, yes, it's clear ...
But difficult is that;
Here my types inheritance:
1.
create or replace type TP_SYS_ABSTRACT_OBJECT as object (
     id                    number,               obj_name          varchar2(1024),      descr               varchar2(1024)
) not final not instantiable
2.
create or replace type TP_PERMISSION3 under TP_SYS_ABSTRACT_OBJECT (
And for polymorphism I create table for storing
all inherited types ...
create table tbl_permissions of TP_SYS_ABSTRACT_OBJECT;
and now i have problem with type casting.
But I found just now !
declare
p1_ref ref tp_permission;
p1 tp_permission;
p2_ref ref tp_sys_abstract_object;
begin
select ref(t) into p2_ref from tbl_permissions3 t where t.id = 1;
select treat(p2_ref as ref tp_permission) into p1_ref from dual;
end;
It's compiled ...
How about it, Dirk ?

Similar Messages

  • As3 get position from object in other object

    please i need help, i have a object inside this object i have other objects, (MC.Part1,MC.Part2,MC.Part3...etc), the MC rotate in the escene, that with interpolation, with the tools of flash,that is ok, the object parent rotate and the childs with he, but i want obtain the coordenate from the childs (MC1.Part1.x, MC1.Part1.y,MC1.Part1.z, etc), i try with trace(MC1.Part1.x), and always give me the same coordenate, i think is the coordenate in the parent, but i want the coordinate of the child when the parend is rotating.
    Please help me

    The coordinates of the child objects do not change relative to the parent that holds them if the parent is being moved, so they will report the same values all of the time.  If you want to know the location relative to the main stage, then you need to make use of the localToGlobal() method.  Try searching Google using terms like "AS3 localToGlobal tutorial" to get an explanation of how to use it.

  • AS: getting integer from object reference of text for insertion point

    I'm thinking in data merge that I need an integer for the insertion point. I have a handy object reference that says, "text from character 78 to character ..."
    I'm trying different ways to get that first integer, but all the backwards ways are failing to turn it into an integer. Brute force such as coercion fail to work. How would you extract "78" from a object reference? thanx, sam

    Thanks, that certainly appears to work, sam

  • Can not get output from Objective DAC without Pulseaudio [SOLVED]

    I have owned the ObjectiveDAC/O2 Amp combo for a couple of months now. Unfortunately I was unable to get the device to function properly without pulseaudio installed. When trying to configure it on a pure alsa system, I can set it as the default control card in alsamixer. The issue is that when I set it as the default pcm device, it fails to work. I can select the device in pulseaudio fine, and my system recognizes the device in alsa, however I cannot, for some reason, actually use the device. It seems that pulseaudio butchers sound quality, and I would greatly appreciate any help being able to get my device working without it. I can't believe that any sane individual would actually make part of the audio stack downmix audio by default.
    It was just a lack of understanding of Alsa's config syntax. I do apologize for taking up space on the forums. I now have Alsa running with my DAC just fine.
    Last edited by agahnim (2015-05-01 13:50:28)

    Yeah that's what I meant. Try to burn a new cd at a slower speed. When the new one is done create a hashsum of the new burn and compare it to the iso you used to burn it with. I only say this because a few times in the past when I had sr0 errors while booting live cds it was because the disk was messed up and I had to burn it again.

  • LoaderInfo get values from EMBED and OBject Tag (not FlashVars)

    hi
    i try get values from object and embed tags like bgColor and
    allowFullScreen
    but i cant find how i can it
    loaderInfo.parameters return only flashVars
    if some body know it please help
    thank you
    Sonettic Cinema
    Project

    <forward name="success" path="/jsp/success.jsp" redirect="true" />
    but when success.jsp page gets called its not displaying the username and usertype values on page.The request has been redirected to success.jsp(*redirect="true"*) and hence the attributes stored in request object will not be available in success.jsp. Use Session to store login user information instead.

  • How do I get an activeX object reference from a LabVIEW ActiveXContainer ref?

    How do I get an activeX object reference from a LabVIEW ActiveXContainer ref?
    I'm trying to control an ActiveX object (a Web Browser) from another VI and need to get the object reference programmatically. I can get the LabVIEW ActiveXContainer reference, but am lost on how to get the reference for the object _inside_ the container.

    Hi Lee,
    The reference to the container is actually also accessing the object inside the container. Use the Property Node and Invoke Node to access properties and launch methods for the object. I've attached a small example that passes the reference to a SubVI and invokes a method inside the SubVI.
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    WebContainer.zip ‏21 KB

  • How can I get the underlying object from the ObjectReference

    Dear friends,
    I think this question has been asked a couple of times. But, I am still wondering if anybody has found an answer to it. Maybe this is some common need ...
    I would like to get the underlying object for which the ObjectReference is
    a mirror For example, I have a class Customer in my application, and I can get an ObjectReference through JDI during runtime. But how can I get the target VM's object which is a real instance of Customer, by which I can invoke methods defined in Customer?
    Thank you so much for any input!
    SunnyDay

    I'll preface this response by admitting this far from an elegant solution, but I did write a function addressing this question, mostly as an exercise.
    If passed an object with an InTextFrame property (Pgf, AFrame, Cell, Fn) that resides in an open document, the function will return the Doc object. Otherwise, it returns undefined.
    function getParentDoc(testObj) {
        //Get object for current page
        try { var curPage = testObj.InTextFrame.FrameParent.PageFramePage; }
        catch(er) {return;}
        //Step backwards to first page in document
        var prevPage = curPage.PagePrev;
        while (prevPage.ObjectValid())
            curPage = prevPage;
            prevPage = prevPage.PagePrev;
        //Compare with first pages of open documents
        var testDoc = app.FirstOpenDoc;
        while (testDoc.ObjectValid())
            if (curPage.id==testDoc.FirstBodyPageInDoc.id) return testDoc;
            testDoc = testDoc.NextOpenDocInSession;    
        return;
    To your PPS: Rather than seeing the native framework grow bloated to address additional features, I would love to see Adobe and other developers publish libraries of useful functions and class extensions.

  • How to get an ArrayList Object in servlet from JSP?

    How to get an ArrayList Object in servlet from JSP?
    hi all
    please give the solution for this without using session and application...
    In test1.jsp file
    i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
    After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
    ---------Code----------
    <jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
    <jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
    <%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
    <jsp:setProperty name="payment" property="strDate" param="expirationDate" />
    <jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
    <%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
    <jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
    <jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
    <jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
    <%
    lis.add(payment);
    %>
    </jsp:useBean>
    <%
    request.setAttribute("lis1",lis);
    %>
    -----------Code in JSP-----------------
    In testServlet.java
    i tried to get the arraylist object in servlet using request.getAttribute
    But I unable to get that arrayObject in servlet.....
    So if any one help me out in this, it will be very helpfull to me..
    Thanks in Advance
    Edward

    Hi,
    Im also facing the similar problen
    pls anybody help..
    thax in advance....
    Litty

  • Get the Picture object location path from crystal report using CRAXDRT.DLL

    Post Author: hpatel_it
    CA Forum: Crystal Reports
    Hi All,I am working on one project - Crystal report to SQL Report conversion and I am using CRAXDRT.DLL to open and read crystal report.I have done conversation of all controls but I am not able to get PICTURE object from Crystal report and also PICTURE object source path.I am using CRAXDRT.OLEOBJECT to get the path of the picture object.if someone have knowledge of CRAXDRT please help me.Regards,Harry

    You can get at specific objects using events,  but not a whole record.
    Can't think of any way of doign this at all...
    Ludek

  • Data from SOAP response not getting into Flex object

    I'm trying to get data from an ALM application we use(Collabnet TeamForge) using a SOAP webservice, and am running into a problem.  I should mention that I am new to both Flex, and webservices.
    I used the "Import Web Services" option in Flex Builder 3, and had it generate code for all operations in the WSDL.  Some of them work just fine.  However, there are several where the data from the SOAP response does not get into the Flex object. The senario that doesn't work is when the response contains a data type that extends another datatype.  In TeamForge, they have a type called TrackerSoapRow.  It extends FolderSoapRow, adding 3 fields.  The problem seems to be that in the response from TeamForge, the 3 fields defined in TrackerSoapRow are in the middle of the fields defined in FolderSoapRow.  I've debugged into it, and the problem occures in mx.rpc.xml.XMLDecoder.getApplicableValues( starting at line 2204 of XMLDecoded.as).  As I read the code, the only way a match can be found is if the fields in the response are in the exact same order as in the definintion.  When its processing the extended data type(  by a call to XMLDecoder.decodeComplexExtension ) at some point, one of the derived type's fields is encountered, and the process stops.
    I have called the service using soapui and verified that all the data I expect is in the response.
    As I mentioned, I'm new to web services.  So, I suppose its possible that the format of the data being returned from TeamForge is incorrect.  That they are not supposed to intermingle base and derived fields.  If thats the case, then I need to report this as a bug to Collabnet.
    All help is appreciated.
    Marc Robertson

    Not knowing any of the details about how you call a web service from OAF myself - I'd suggest you post on the proper forum for OA Framework questions: {forum:id=210}
    John

  • Record Management: get logical document object from physical doc. object

    Hello,
    I'd like to get logical document from physical document (sdok object - stricture containing class and objid).
    There is BAPI for "opposite direction": SDOK_LOIO_PHYSICAL_OBJECT_GET. By this FM I can get physical document's sdok object from logical document's sdok object.
    Can anybody tell me BAPI's name for it?
    I tried SDOK_PHIO_LOGICAL_OBJECT_GET, but this BAPI doesn't exist.
    Best regards,
    Josef Motl

    Josef,
    There are I don't believe there are any bapi's for this. You probably have to do this via ABAP OO. Create an object of the type CL_SRM_DOCUMENT. This is your logical (LOIO) object of your document. You have to enter the documentclass and the objectid of the document. This class has a method get_variant. This variant is your fysical (PHIO) object of the document. Use version and variant 0 so you will get the latest version object of your document.
    If this isn't the answer, can you please explain where do you get the fysical object from if you haven't got the logical first?
    Regards,
    Tjalling-Jan

  • Problem in getting a session object  from FacesContext into a Servlet

    Hi,
    I am new to JSF. I had a session bean and I want to get the instance of the session bean in a servlet. I wrote the below code to get the bean object, but some times it is failing and giving NullPointer Exception.
    Can anyone send the code which works perfectly to retrieve the Faces Context session bean object into a Servlet.

    Which code are you talking about? I don't see any code :)
    Well, this snippet here might be useful: http://balusc.xs4all.nl/srv/dev-jep-com.html#AccessingTheFacesContextInsideHttpServletOrFilter

  • Ways to get data from the internet with XCode and Objective-C

    Hey guys,
    Thanks in advance for any help. I was simple wondering what the best ways are to get data from the internet to use in an application. For example, is it best to store the data in a MySQL database with PHP and then use C code and MySQL commands to get that data from my Mac app? Is JSON better? Any help would be awesome!
    Josh

    What kind of data are you after?
    Eric

  • Read data from Object Services

    Hi ,
    I need to display the text from 'Object Services' for a Material in a report. The Object type is 'BUS1001' for Material . Users Maintain texts in these Object services in Transaction MM03/MM02. I have to extract and display latest text entered by the user for each material in the Report.
    Please let me know, How to extract the Data from Object services?
    Any ideas will be rewarded with points.
    Thanks
    Shekar

    Reading form the GOS object would not be a easy task.
    Steps would be like:
    1. Get the all GOS attachement which are NOTES by calling method CL_BINARY_RELATION=>READ_LINKS providing the Business Object Key
    2. Call the FM SO_OBJECT_READ to get the NOTE by providing the Folder and Object information.
    Here is the sample code:
    REPORT  ztest_np_gos_note.
    PARAMETERS: p_matnr TYPE mara-matnr.
    START-OF-SELECTION.
      DATA: gs_lpor TYPE sibflporb.
      gs_lpor-instid = p_matnr.
      gs_lpor-typeid = 'BUS1001006'.
      gs_lpor-catid  = 'BO'.
      DATA: lt_relat TYPE obl_t_relt,
            la_relat LIKE LINE OF lt_relat.
      la_relat-sign = 'I'.
      la_relat-option = 'EQ'.
      la_relat-low = 'NOTE'.
      APPEND la_relat TO lt_relat.
      DATA: t_links TYPE obl_t_link,
            la_links LIKE LINE OF t_links.
      DATA: lo_root TYPE REF TO cx_root.
      TRY.
          CALL METHOD cl_binary_relation=>read_links
            EXPORTING
              is_object           = gs_lpor
              it_relation_options = lt_relat
            IMPORTING
              et_links            = t_links.
        CATCH cx_root INTO lo_root.
      ENDTRY.
      DATA l_folder_id TYPE soodk.
      DATA l_object_id TYPE soodk.
      DATA document_id       TYPE sofmk.
      READ TABLE t_links INTO la_links INDEX 1.
      document_id = la_links-instid_b.
      l_folder_id-objtp = document_id-foltp.
      l_folder_id-objyr = document_id-folyr.
      l_folder_id-objno = document_id-folno.
      l_object_id-objtp = document_id-doctp.
      l_object_id-objyr = document_id-docyr.
      l_object_id-objno = document_id-docno.
      DATA document_content  TYPE STANDARD TABLE OF soli.
      CALL FUNCTION 'SO_OBJECT_READ'
        EXPORTING
          folder_id                  = l_folder_id
          object_id                  = l_object_id
        TABLES
          objcont                    = document_content
        EXCEPTIONS
          active_user_not_exist      = 1
          communication_failure      = 2
          component_not_available    = 3
          folder_not_exist           = 4
          folder_no_authorization    = 5
          object_not_exist           = 6
          object_no_authorization    = 7
          operation_no_authorization = 8
          owner_not_exist            = 9
          parameter_error            = 10
          substitute_not_active      = 11
          substitute_not_defined     = 12
          system_failure             = 13
          x_error                    = 14
          OTHERS                     = 15.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Regards,
    Naimesh Patel

  • Can not cast from object to int

    Hi All,
    I have the following bunch of code
    Session session;
              session = getSessionFactory().openSession();
              Query query;
              int MaxPageId = 0;
              List list;
              try{
                   query = session.createQuery("select max(emp.id) from EmpBean emp");
                   list = query.list();
                   MaxPageId = (int) list.get(0);
                   return MaxPageId;
              catch(Exception e){
                   System.out.println(e.getMessage());
              return MaxPageId;
    The query executed successfully but when i get the max id in a integer variable by the following statement
    MaxPageId = (int) list.get(0);
    I get the following error "can not cast from object to int"
    Please suggest for the same.
    -Thanks

    Cast to an Integer, not an int, and let autoboxing turn the Integer into an int.
    int maxPageId;
    maxPageId = (Integer) list.get(0);You can't cast objects into primitives.
    Autoboxing isn't casting.
    And use Java naming conventions. Local variables start with a lower-case letter.

Maybe you are looking for

  • Error while running report form januray 2008

    hi experts ! A report was running fine till last month. but in the month is january, the following error exists : Object ZPP_PRODUCTION_REP of class RE and language EN does not exist. Message no. SF616 can anyone please help what may be the cause of

  • Tessellations

    I want to make a tessellation using Photoshop Elements 4.0 on a Dell pc with XP. I want to use digital photos in this tessellation. Can anyone help me with this project.

  • Help, my battery died!

    So... I sent in my original battery about this time last year because of the battery recall. After a while I noticed that my new battery overheated a lot more than the original one... probably a lot more prone to fires than the last one. Finally, las

  • Purchasing Windows 7 -- do I need Office 2010?

    Does anyone know if I'll be able to open and run (and edit) Powerpoint &/or Word documents on a new Toshiba laptop with Windows 7 without purchasing additional software, such as Office 2010?  Thanks

  • Mig7 project Debugging with ILA core - Timing Error in implementation

    Hello, I am designing a core which has only performing read/write operations to/from DDR3 SDRAM with MIG7 IP core. I am synthesizing and implementing without any problem if I have no ILA core present in the project. After adding the ILA core I am hav