Record types in Pro*C

Say I have the following package:
CREATE OR REPLACE PACKAGE temp_test_pkg IS
     TYPE test_type IS RECORD (
                     num  number,
                     chr  varchar2(10));
     TYPE test_arr_type IS TABLE OF test_type INDEX BY PLS_INTEGER;
     PROCEDURE test_proc(p_tst OUT test_type);
     PROCEDURE test_proc2(p_tst OUT test_arr_type);
END temp_test_pkg;And I want to call the test_proc and test_proc2 functions from a Pro*C application. How can I do this? I have not seen any method to pass record types, or even worse tables of record types, in Pro*C and so far the only thing I can think of is to break up the record into individual arguments, which is ugly.
I have looked into the Object Type Translator and I don't think it will work without making changes to the packages since everything will have to be re-typed as object types. I can not do this, so unless OTT will work without changing the types that "solution" is out.

All interesting to know, but it all confirms what I thought all along: object types and its associated object cache were designed to manipulate table data not temporary data that was created and passed just to satisfy the temporary need to get data into a Pro*C/C application.
Thanks! But it looks like object types bring with them an amount of overhead that is not going to be suitable for our task. We'd constantly be bringing in the objects, consuming them, and then flushing them out of the cache because we'll be recreating them again next time (in the PL/SQL procedure) and they won't ever be the same. In order for this to change we'd need to redesign the entire thing, and while that is certainly something to keep in mind, for now we don't have the time!
If and when we decide to redesign, I will certainly take all this into consideration!
For my own edification, however, how much faster did you find the OCCI implementation over the Pro*C implementation? We don't use the OCI layer for anything yet, so this would be a first, and so I may have to sell its use.
Thanks!
-- Brian

Similar Messages

  • Powerbook G4 10.4.11  won't start from hard drive .  Tried repair, " The underlying task reported failure on exit (-9972).Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.

    Powerbook G4 10.4.11  won't start from hard drive .  Tried repair, " Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.Powerbook G4 10.4.11  won't start from hard drive .  Tried repair, " The underlying task reported failure on exit (-9972).Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.
    The underlying task reported failure on exit (-9972).

    kauribill wrote:
    " The underlying task reported failure on exit (-9972).Invalid sibling link,invalid B tree header, invalid map node,invalid record type,the volume needs to be repaired.
    The underlying task reported failure on exit (-9972).
    This is a directory issue that Disk Utility cannot fix. Although it manifests itself as a software issue sometimes it may be hardware based. See DiskUtility reports "Underlying task reported failure" when repairing avolume http://support.apple.com/kb/TS1901?viewlocale=en_US". You can try using a utility like TechTool Pro, Drive Genius or Disk Warrior to repair and replace the directory. Another option would be to use the Archive and Install feature to reinstall. If the problem returns after correction you may have a failing or failed HDD.
    cornelius

  • Passing record Types in BPEL

    Hi all,
    I was creating and passing / getting back record types for calling a plsql method in bpel , until i came upon a method where i define a type ref cursor and get all the attributes in the ref cursor. This makes my application very generic as i can add as many out put parameters into the record type and get them in the xml. I just wanted to know the pros and cons of this approach . Is this better than defining a static record type and getting the values as the only changes i need to make if the calling application asks for more parameters would be in the backend code.
    Thanks
    -Pradip

    All interesting to know, but it all confirms what I thought all along: object types and its associated object cache were designed to manipulate table data not temporary data that was created and passed just to satisfy the temporary need to get data into a Pro*C/C application.
    Thanks! But it looks like object types bring with them an amount of overhead that is not going to be suitable for our task. We'd constantly be bringing in the objects, consuming them, and then flushing them out of the cache because we'll be recreating them again next time (in the PL/SQL procedure) and they won't ever be the same. In order for this to change we'd need to redesign the entire thing, and while that is certainly something to keep in mind, for now we don't have the time!
    If and when we decide to redesign, I will certainly take all this into consideration!
    For my own edification, however, how much faster did you find the OCCI implementation over the Pro*C implementation? We don't use the OCI layer for anything yet, so this would be a first, and so I may have to sell its use.
    Thanks!
    -- Brian

  • Video recorded in QT Pro-compatible with FCP?

    Is a video recorded in QT Pro compatible with FCP?
    I was getting errors earlier today importing QT video clips recorded in QT Pro.
    FCP said "unknown file type" and wouldn't import it.
    I tried different decks, different footage, all to no avail.
    Drag and drop, file>Import, neither worked.
    I never tried this before and was surprised.
    It's not that it needed rendering, it just wouldn't import.
    QT was set to use the native format of the recording device.
    FCP was set to DV NTSC easy set up.
    OS 10.4.7, QT 7.1.2, FCP 5.0.4.
    Thanks,
    Richard

    Now this is strange.
    I just downloaded Live Capture Plus to try it out.
    It captures the same tape from the same deck with the same settings as I tried in QT.
    Imports perfectly into FCP 5.1.1 No problems whatsoever.
    Both clips have identical settings in the info pane of QT Pro:
    DV/DVCPRO - NTSC, 720 x 480 (640 x 480), Millions
    16-bit Integer (Big Endian), Stereo (L R), 48.000 kHz
    29.97
    640 x 480 pixels
    Yet the QT clip will not import into FCP with an "unknown file" error.
    Why?
    Thanks
    Richard

  • Error while creating function with record type as return type

    Hi i tried the following code to get the nth highest sal using record type and function.
    CREATE OR REPLACE PACKAGE pack_rec_cur AS
    TYPE rec_type IS RECORD (
    name EMP.ename%TYPE,
    sal EMP.sal%TYPE);
      END;The above package is created
    CREATE OR REPLACE
      FUNCTION fun_rec_cur(n INT) RETURN pack_rec_cur.rec_type AS
       rec pack_rec_cur.rec_type;
        CURSOR cur_rec IS
          SELECT ename,sal
            FROM emp
             WHERE sal is not null
              ORDER BY DESC;
    BEGIN
    OPEN cur_rec;
      FOR i IN 1..n LOOP
       FETCH cur_rec into rec;
       EXIT WHEN cur_rec%NOTFOUND;
      END LOOP;
    CLOSE cur_rec;
    RETURN rec;
    END;   The above function is giving errors
    LINE/COL ERROR
    4/7      PL/SQL: SQL Statement ignored
    7/16     PL/SQL: ORA-00936: missing expression
    SQL> Could you please correct me where i'm doing mistake
    Thanks.

    You are missing the column name in order by clauase. Is it ename desc?
    CREATE OR REPLACE
      FUNCTION fun_rec_cur(n INT) RETURN pack_rec_cur.rec_type AS
       rec pack_rec_cur.rec_type;
        CURSOR cur_rec IS
          SELECT ename,sal
            FROM emp
             WHERE sal is not null
              ORDER BY ENAME DESC; ---added ename
    BEGIN
    OPEN cur_rec;
      FOR i IN 1..n LOOP
       FETCH cur_rec into rec;
       EXIT WHEN cur_rec%NOTFOUND;
      END LOOP;
    CLOSE cur_rec;
    RETURN rec;
    END;  
    -OUTPUT
    SQL> SET SERVEROUT ON
    SQL>
    SQL> DECLARE
      2     rec            pack_rec_cur.rec_type;
      3  BEGIN
      4     rec         := fun_rec_cur (6); --you get the 6th record in order of ename desc
      5     DBMS_OUTPUT.put_line ('ename::' || rec.NAME || '  sal ::' || rec.sal);
      6  END;
      7  /
    ename::MARTIN  sal ::1250
    PL/SQL procedure successfully completed.
    SQL>

  • Error in using plsql record type inside packages

    Dear Friends,
    Using Ora9iR2 on Windows 2000 Server. I am trying to declare a record type and a nested table of that record type in the package body and the initialise that in the package body then insert records into that. But I receive error msg.
    CREATE OR REPLACE PACKAGE sample1 AS
    TYPE rcur IS REF CURSOR;
    TYPE emp_record IS RECORD
    (empname VARCHAR2(20),
    job VARCHAR2(10),
    salary NUMBER);
    TYPE emp_result IS TABLE OF emp_record;
    PROCEDURE emp_test ( i_empno emp.empno%TYPE);
    END sample1;
    -- Package Body
    CREATE OR REPLACE PACKAGE BODY sample1 AS
    PROCEDURE emp_test ( i_empno IN emp.empno%TYPE)AS
    c1 rcur;
    eresult emp_result := emp_result();
    v_empname VARCHAR2(20);
    v_job VARCHAR2(10);
    v_sal NUMBER;
    BEGIN
    OPEN c1 FOR SELECT ename,job,sal FROM emp WHERE empno = i_empno;
    LOOP FETCH c1 INTO v_empname,v_job,v_sal;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(v_empname||' , '||v_job||' , '||v_sal);
    eresult := emp_result(v_empname,v_job,v_sal); showing error
    END LOOP;
    CLOSE c1;
    END emp_test;
    END sample1;
    While executing the procedure with out the line eresult := emp_result(v_empname,v_job,v_sal); the procedure executes fine.
    SQL> execute sample1.emp_test(7900);
    JAMES , CLERK , 950
    PL/SQL procedure successfully completed.
    With that line, i have error
    SQL> execute sample1.emp_test(7900);
    BEGIN sample1.emp_test(7900); END;
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04063: package body "KUMAR.SAMPLE1" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at line 1
    While executing in PL/SQL Developer, it says the wrong number or types of arguments call to ;EMP_RESULT'.
    Please guide me where I am wrong.
    Kumar

    I got invalide data type error.I think the datatype in the CAST() clause must be a SQL Type i.e. one created with a CREATE TYPE command in the database. emp_result is only a PL/SQL datatype.
    But I dont know why it is saying error
    eresult(eresult.count) := emp_result(v_empname,v_job,v_sal); eresult is a table of records. It is therefore expecting a record. records don't seem to be created in the same way that user defined types are.
    The concept of handling records like this is new to 9i and they are still smoothing out the bumps. Things are a lot better in 9.2 than in 9.0.1 if it's any consolation. There is a particular gap in the documentation, which is what's tripping you up at the moment: the difference between TYPE AS RECORD and other types, also the difference between VARRAY, NESTED TABLE and REF CURSOR. To be honest, it's all kind of hazy for me at the moment: I always need to run some code before I make any pronouncements on this topic.
    Good luck, APC

  • How create a record type and a pl/sql table of that record type in database

    Hi
    I want to create a record type and then I want to create a PL/SQL table in the oracle 9i database.
    I have done it in PL/SQL block.
    But when I am trying to do it in database it is throwing me some error.
    Could you please tell me how can I do that?
    Regards

    user576726 wrote:
    Hi
    I want to create a record type and then I want to create a PL/SQL table in the oracle 9i database.
    I have done it in PL/SQL block.
    But when I am trying to do it in database it is throwing me some error.
    Could you please tell me how can I do that?
    RegardsRECORD type is supported only in PL/SQL for SQL you need to use OBJECT type.

  • How to assigne value in sub record type

    Dear below mention record type database,now i want to assigne value in payr_rec type,in this recrocrd type have one column party_id,but how can assigne value int this field ,
    TYPE group_rec_type IS RECORD(
    group_name VARCHAR2(255),
    group_type VARCHAR2(30),
    created_by_module VARCHAR2(150),
    -- Bug 2467872
    mission_statement VARCHAR2(2000),
    application_id NUMBER,
    party_rec PARTY_REC_TYPE := G_MISS_PARTY_REC
    please guide.

    to get the desired default party_rec attribute value, just assign the "sub-record" attribute defaults as desired; PL/SQL will assign a default (non-null) record as the party_rec value using those attribute defaults:
    create or replace package P_Test_It
    as
         type party_rec_type is record (
              dummy varchar2(1) default 'X'
         type group_rec_type is record (
              group_name VARCHAR2(255),
              group_type VARCHAR2(30),
              created_by_module VARCHAR2(150),
              -- Bug 2467872
              mission_statement VARCHAR2(2000),
              application_id NUMBER,
              party_rec PARTY_REC_TYPE
    end;
    set serveroutput on
    declare
         rec p_test_it.group_rec_type;
    begin
         dbms_output.put_line(rec.party_rec.dummy);
    end;
    X
    PL/SQL procedure successfully completed.Hope it helps.
    Gerard

  • I am recording with Logic Pro X, using my Yamaha XS8 keyboard as a Midi controller. I also have a Thunderbolt Display. Every time I play and release a note on the keyboard, the Thunderbolt Display speaker emits a doink sound. How do I get it to stop?

    I am recording with Logic Pro X, using my Yamaha XS8 keyboard as a Midi controller. I also have a Thunderbolt Display. Every time I play and release a note on the keyboard, the Thunderbolt Display speaker emits a doink sound. What is causing it and how do I get it to stop? My sound is running through the Saffire Pro 40 Interface (Focusrite) into external speakers with powered amps.
    Also, When I record I am hearing little pops in the system. I have checked all of my meters and they are not clipping. What is causing it and how do I get it to stop?
    Ken

    MUYconfundido wrote:
    Pancenter,
    Thanks for the response, but I do not have a midi interface. I am using a midi to usb connector cable, thus bypassing the need for a Midi interface.
    The Mac reads the USB cable as a midi device, but not the keyboard that I am trying to use as a controller. I have tried it with my korg sp 300 and with my Nord Electro 2.
    Thoughts?
    Thanks,
    Tristan
    Tristan...
    This is what you have, correct?
    http://www.alesis.com/usbmidicable
    This from Alesis..
    "The AudioLink Series USB cable receives and outputs MIDI signal thanks to its internal interface. The USB-MIDI Cable connects plug-and-play to your Mac or PC for an all-in-one USB-MIDI solution."
    Notice, -internal interface-. What you have is a simple USB MIDI Interface. Most MIDI interfaces are USB.
    My point is (was), MIDI OUT of the Korg goes to the connector marked MIDI IN on the Alesis, those new to MIDI often get this wrong.
    pancenter-

  • ACH CTX - Addenda Record Type 7

    Hi,
    I am working on ACH CTX file for vendor payments through Wells Fargo bank. I need some help on the Addenda Record type 7. The format generated by standard SAP for this record type 7 is not acceptable by the bank. And they are not able to help us out much on what should be the format. All they say is that it should be in ANSI ASC X12 format (payment-related information) and refer NACHA format guidelines. Can anyone tell me what is this NACHA format and what data elements should be passed on in this record type. Is there a specific format I can follow?
    Thanks,
    Raj/

    Hi,
    did you solve this items. Any information would be helpful.
    thanks
    Regards
    PG

  • Howto post offsetting entries for Record type Z Line items in KE24 from FI

    HI,
    We are facing one problem for order created from CRM.
    Firstly this order  has created  with one profit center ( ex PH50293 ) they have posted some plan values and released the order in CRM so values flown to ECC and available in KE24 .
    After some time , we have changed profit center for this order in CRM by changing  service organisation and release the order after that we have posted some values in that order which is not flown to ECC becuase of different profit center
    Later we rejected the all values and make balance zero in CRM , But still values are appearing in KE24 and there is inconsistency of profit center between ECC & CRM.
    Now want to make the balances zero in KE24 for that order. but it shows record type Z ,
    So , now how we can rectify this and how we can make balances zero
    __Note :  as per present setting in the system, we can not change the profit center in CRM once order released_._
    Thanks & Regards
    Gupta

    Dear VK,
    I guess, the only option would be to post manual correction thru KE21N, with negative values for record type Z.
    Trust this helps.
    Cheers.

  • Oracle Account Receivables Lockbox Error, No ITEM NUM on PAYMENT record type.

    Hi,
    For "Process Lockbox" program. The program completes normally, but receipts are not created and I am getting below error in log file:-  
    "AR-ARLFMT: No ITEM NUM on PAYMENT record type."
    This error message is similar to error message mentioned in note id (Troubleshooting Known Issues In Lockbox (Doc ID 1366298.1)) :-
    2.10. Lockbox ends with error: "AR-ARLFMT: No PAYMENT NUM on PAYMENT record type"
    Symptoms
    You are trying to run lockbox and receive this error message in the log file:
    AR-ARLFMT: No PAYMENT NUM on PAYMENT record type.
    Your lockbox interface program has completed successfully, however,there is No Data Found in the AR_PAYMENTS_INTERFACE table.
    Solution
    Responsibility: Receivables Manager
    Navigation: Setup > Receipts > Lockboxes > Transmission Formats
    For the Transmission Format name that you are using, make sure that there is a 'Transmission Record' defined and that there is a Transmission Field with a Field Type of  'Record Identifier' defined.
      Make sure to include the check number in Transmission Format and Control file
    and item number is:-
    Item Number: A sequence number that your bank assigns to a specific payment. This number associates an invoice with a receipt.
    I am passing item number, but still I am getting this error.
    Can anybody please help.
    Thanks in advance.
    Regards
    Gagan Garg

    Hi,
    For "Process Lockbox" program. The program completes normally, but receipts are not created and I am getting below error in log file:-  
    "AR-ARLFMT: No ITEM NUM on PAYMENT record type."
    This error message is similar to error message mentioned in note id (Troubleshooting Known Issues In Lockbox (Doc ID 1366298.1)) :-
    2.10. Lockbox ends with error: "AR-ARLFMT: No PAYMENT NUM on PAYMENT record type"
    Symptoms
    You are trying to run lockbox and receive this error message in the log file:
    AR-ARLFMT: No PAYMENT NUM on PAYMENT record type.
    Your lockbox interface program has completed successfully, however,there is No Data Found in the AR_PAYMENTS_INTERFACE table.
    Solution
    Responsibility: Receivables Manager
    Navigation: Setup > Receipts > Lockboxes > Transmission Formats
    For the Transmission Format name that you are using, make sure that there is a 'Transmission Record' defined and that there is a Transmission Field with a Field Type of  'Record Identifier' defined.
      Make sure to include the check number in Transmission Format and Control file
    and item number is:-
    Item Number: A sequence number that your bank assigns to a specific payment. This number associates an invoice with a receipt.
    I am passing item number, but still I am getting this error.
    Can anybody please help.
    Thanks in advance.
    Regards
    Gagan Garg

  • DB proc - do you need to create a table to pass a ref cursor record type?

    I want to pass a limited selection of columns from a large table through a DB procedure using a REF CURSOR, returning a table rowtype:
    CREATE OR REPLACE package XXVDF_XPOS_DS021_ITEMS AS
         TYPE XXVDF_XPOS_DS021_ITEM_ARRAY
         IS REF CURSOR
         return XXVDF_XPOS_DS021_ITEM_TABLE%ROWTYPE;
    Do I need to create this dummy table?
    I can't get a TYPE to work, where the type is an OBJECT with the desired columns in it.
    So a dummy empty table will sit in the database...
    Is there another way?
    thanks!

    You can use RECORD type declaration:
    SQL> declare
      2   type rec_type is record (
      3    ename emp.ename%type,
      4    sal emp.sal%type
      5   );
      6   type rc is ref cursor return rec_type;
      7   rc1 rc;
      8   rec1 rec_type;
      9  begin
    10   open rc1 for select ename, sal from emp;
    11   loop
    12    fetch rc1 into rec1;
    13    exit when rc1%notfound;
    14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    15   end loop;
    16   close rc1;
    17  end;
    18  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300or use, for example, VIEW to declare rowtype:
    SQL> create view dummy_view as select ename, sal from emp;
    View created.
    SQL> declare
      2   type rc is ref cursor return dummy_view%rowtype;
      3   rc1 rc;
      4   rec1 dummy_view%rowtype;
      5  begin
      6   open rc1 for select ename, sal from emp;
      7   loop
      8    fetch rc1 into rec1;
      9    exit when rc1%notfound;
    10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    11   end loop;
    12   close rc1;
    13  end;
    14  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300 Rgds.

  • Reading fixed length file with different record types

    Hi,
    I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
    But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
    How we need to read such files.
    Thanks
    Ravdeep

    hi ,
    u cannot use the default wzard for this
    use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • Dbms_xmlgen using pl-sql record type

    Hi
    I want to pass pl-sql record type and want to generate xml. Can dbms_xmlgen access pl-sql record type instead of query?
    OR please let me know any other package to pass pl-sql record type and generate XML.
    Thanks in advance

    Can dbms_xmlgen access pl-sql record type instead of query?Don't think so, but can't you pass the individual record components:
    SQL> declare
      type rec is record
        a   int,
        b   varchar2 (30)
      r     rec;
      ctx   int;
      x     xmltype;
    begin
      r.a := 1;
      r.b := 'Michael';
      ctx := dbms_xmlgen.newcontext ('select :x id, :y name from dual');
      dbms_xmlgen.setbindvalue (ctx, 'x', r.a);
      dbms_xmlgen.setbindvalue (ctx, 'y', r.b);
      x := dbms_xmlgen.getxmltype (ctx);
      dbms_output.put_line (x.getstringval ());
      dbms_xmlgen.closecontext (ctx);
    end;
    <ROWSET>
    <ROW>
      <ID>1</ID>
      <NAME>Michael</NAME>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed.?

Maybe you are looking for

  • Can't access some websites - URL is hijacked by "unotelly" - ??

    This has a virus-like feel to it... I can't access certain websites,. When I do, I'm bumped to a site for Untotelly. I type: www.bbc.co.uk And I go to:  http://quickstart3.unotelly.com/?origin=http://www.bbc.co.uk/ At the top of that page I'm asked t

  • Creating a offline version of an existing Web application

    Hi, I'm working on converting a small portion of an existing web application into offline version (using Webtogo platform and Oracle Lite 9i) . The Web application is developed using active server pages and Oracle 9i is used as backend. The offline v

  • Errors encountered during installation.(U44M1P7)

    Every time I try to update extension manger cc I get this error. I have tried download updates 7.1 to 7.2 manually and installing but when a ne w update is released the CC app fails installation every time. Plus most of the extensions I did have are

  • Getting errors in XP mode even after removal of the problem KB????

    I removed the KB??? which was mentioned as a problem with the integration features, but I'm still getting errors in XP mode. One issue is that the icons are sometimes missing which I click on startup. Trying to logoff usually shows that CB monitor an

  • Conversion from iPhoto (oh, not again)

    Before asking my question let me start by thanking all the regular contributors to the Aperture forum, and in particular Terence Devlin, Kirby Krieger and Frank Caggiano. Your posts have been more valuable to me than any book I bought or any course I