Block on PL/SQL Table of Record

Hi,
I am using Developer 6 with Oracle 8i, I based my block on PL/SQL procedure returning table of record, the form is running fine, but when ever I try to get data set, more then 200 rows, first it gows for query, working for a moment and then closed the form with out giving any result. And the least possible queryable data is 1000 to 30000.
It is working fine with less then 200 rows.
The form is also working fine with Ref Cursor with any of rows, but what I am doing is only possible with Table of record type.
Please give me your good advise what should I do.
Please accept my thanks in advance.
Fahim

This should not happen. If you are not sure that your stored procedure is bug-free, you could generate and use stored procedures using my SQLPlusPlus and give it a try.
You can email me directly if your problem still not gets solved.
regards,
M. Armaghan Saqib
+---------------------------------------------------------------
| 1. SQL PlusPlus => Add power to SQL Plus command line
| 2. SQL Link for XL => Integrate Oracle with XL
| 3. Oracle CBT with sample GL Accounting System
| Download free: http://www.geocities.com/armaghan/
+---------------------------------------------------------------
null

Similar Messages

  • REPORT ON PL/SQL TABLE OF RECORDS  on 6i & 9i

    HELLO ALL,
    I Want to know if it is posible to build a report on pl/sql
    table of records in developer 6i, or in 9i.
    thanks

    This should not happen. If you are not sure that your stored procedure is bug-free, you could generate and use stored procedures using my SQLPlusPlus and give it a try.
    You can email me directly if your problem still not gets solved.
    regards,
    M. Armaghan Saqib
    +---------------------------------------------------------------
    | 1. SQL PlusPlus => Add power to SQL Plus command line
    | 2. SQL Link for XL => Integrate Oracle with XL
    | 3. Oracle CBT with sample GL Accounting System
    | Download free: http://www.geocities.com/armaghan/
    +---------------------------------------------------------------
    null

  • ERROR WHEN RETURNING A PL/SQL TABLE?

    Hi,
    I try to call a Oracle 9i function from Oracle 8i via TEST9.WORLD dblink.
    The function returns me a pl/sql table.
    It compiles but when I try to execute I get the following error
    The following error has occurred:
    ORA-02068: following severe error from TEST9.WORLD
    ORA-06512: at "TBSDEV.GETDATA", line 12
    ORA-06512: at line 2
    Note: I test the code in a single database instance
    and it works fine. The problem occurs when I move the getData function to 8i and
    call the package function via a dblink.
    What can I do?
    what might be the problem?
    Does not Oracle permit us move table of records between 2 database instances?
    ]f it does not, it is very tragic because we can get the SQL Server record sets to
    Oracle 9i through a gateway but we could not move these records sets within Oracle?
    !!!!!!!!!!! All of the code .} use is listed below.
    thanks in advance.
    --BELOW IS MY PACKAGE IN ORACLE 9i SERVER
    --THIS PACKAGE GETS DATA FROM SQL SERVER THROUGH TRASPARENT GATEWAY
    CREATE OR REPLACE package tgw is
    TYPE RefCursorType IS REF CURSOR;
    TYPE HisseRecordType IS RECORD( HisseAd VARCHAR2(20) := '' );
    TYPE HisseTableType IS TABLE OF HisseRecordType INDEX BY BINARY_INTEGER;
    mytable HisseTableType;
    myrecord HisseRecordType;
    function getRecords return HisseTableType ;
    end;
    CREATE OR REPLACE package body tgw is
    function getRecords return HisseTableType is
    rc RefCursorType;
    htable HisseTableType;
    hrec HisseRecordType;
    BEGIN
    "ahtha"."getHisseSenetleri"@ata(rc); --CALLS SQL SERVER STORED PROCEDURE
    FOR i IN 1..10 LOOP
    FETCH rc INTO htable(i);
    END LOOP;
    CLOSE rc;
    RETURN htable;
    END;
    end;
    --HERE IS THE PROCEDURE IN OUR MAIN ORACLE 8i SERVER
    -- TGW9i ]S THE dblink to the oracle 9i
    -- THE BELOW CODE COMPILES BUT GIVES THE ERROR I MENTIONED ABOVE
    PROCEDURE getdata is
    htable tgw9i.mytable%TYPE;
    hrec tgw9i.myrecord%TYPE;
    begin
    htable:=tgw9i.getRecords(10);
    FOR i IN 1..10 LOOP
    DBMS_OUTPUT.PUT_LINE(htable(i).HisseAd);
    END LOOP;
    end;

    The problem might be passing PL/SQL Tables or Records over your database link. You might run some more simple tests with PL/SQL Records and Tables over your link.
    1) I still suggest you use a GLOBAL TEMPORARY TABLE to pass your information, attempt to do everything in a few SQL statements to pass the informaiton. And then process it on the other side. Database links tend to be a bit slow, and so you want to try to reduce the number of times you extract information through the link.
    2) Someone else may have more experience with DB links, and calling procedures through them.
    I wish you luck that you find your answer soon,
    Eric Kamradt

  • Pl sql tables to VB

    Hi all,
    We have ORACLE 7.3 as server and VB 6.0 as the client . We have a procedure that returns PL/SQL table as an out parameter.When the procedure returns a single dimensional PL/SQL table , the front end does not have any problem in getting the output. When the same package tries to return a multidemensioanl PL/SQL table to front end we get an error message in the front end saying that the provider does not support PL/SQL tables or records.The package creates the PL/SQL table as follows
    TYPE emp_inf is RECORD
    (empno varchar2(7),
    ename varchar2(50));
    TYPE emp_inf_table is table of emp_inf
    INDEX BY BINARY_INTEGER;
    The procedure works fine on the server side.Any ideas why we are getting that error message. We are using ADO in the front end. Any other way of doing the above.
    Thanks in advance,
    Jay.

    direct vb questions which use the odbc driver to the odbc forum.
    you might get an answer there.

  • 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.

  • Pl/sql table - row type records

    Hi,
    Is there any limit on the number of records that a pl/sql table (row type) can accomodate.Iam using oracle 10g

    user11200499 wrote:
    I have gone thru that url, nothing on the maximum number of records that can be present in pl/sql table is given there. Will be very helpful if you can let me know if there is any such limitation.There is no such thing as a PL/SQL "+table+". A table, in Oracle terminology, means colums and rows and indexes and the ability to scale data, effectively read and process and filter and aggregate data.
    A so-called PL/SQL "+table+" is nothing at all like this.
    The correct term for it, and used in all other programming languages, are arrays (procedural term) and collections (object orientated term).
    An array/collection is a local memory structure in the unit of code. In PL/SQL, that means PGA (process global area) memory. And as this uses server memory, you should not abuse it and only use as much that is truly needed.
    Make a PL/SQL array/collection too large, and PGA grows.. and can have a very negative impact on performance. It can even cause the server to crawl to halt, where you will struggle to enter a commandline command on the server as it is spending 99% of CPU time trying to deal with memory requests and page swapping.
    So what do we then use arrays/collections for in PL/SQL?
    For the very same reason we use in any other programming language - dealing with managing local programming data in a more effective memory structure. Such as bulk processing when requiring a buffer variable that can be passed to and from the PL and SQL engines.
    This does NOT mean using it as you would use it as if it is a SQL table. As it is not.
    So to answer your question of how large a PL/SQL array or collection can be? That depends entirely on the problem you are trying to solve. If it is for example bulk processing, then typically a collection of a 100 rows provides the best balance between the amount of (expensive) PGA memory being used versus the increase in performance by reducing context switching between the PL and SQL engines.
    If the rows are quite small, perhaps even a 1,000 row collection. More than that seldom decreases context switching enough to justify the increase in expensive PGA.
    So what should then be used to store larger data structures in PL/SQL? GTT or Global Temporary Tables. As this is a proper SQL table structure. Can be indexed. Natively supports SQL. Can scale with data volumes.
    And most importantly, it does not consume dedicated process memory and will not blow server memory.

  • How to delete the Table Contents before inserting records into SQL table ?

    Hello Experts,
            I have a scenario where in I have to Pick up some records from SAP RFC & insert into SQL table.
            i know how to do this scenario but the proble with this is before inserting we first have to ZAP the SQL table & insert a new records. One more twist is The Triggering is happening from SAP side with Sender RFC. If this would have been from SQL Side i could have written a Stored Procedure/ Trigger & could have called this before the SENDER JDBC communciation channel picks up the Triggering event from SQL side.
    So how to do this scenarioin XI, First deleting all the Records of SQL table & then inserting the new reocrds. without using the BPM.
    Regards,
    Umesh

    hi umesh,
    you can achieve this by writing SQL query in message mapping level..
    refer this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    regards.

  • Should I use BCS my backend database will update all the record of the sql table daily.

    Should I use the BCS where the database table is going to be updated daily.
    All the records will be updated on daily basis.
    Why should I use BCS when I can connect to the sql server directly and  update the records that I need.
    What additional benefits can I get from BCS , I do not need the search functionality.
    Regards

    Hi,
    According to description, my understanding is that you want to know if you need to use Business Connectivity Services to connect external SQL table.
    Business Connectivity Services is a centralized infrastructure in SharePoint 2013 and Office 2013 that supports integrated data solutions.
    Business Connectivity Service will provide a familiar user interface to manage sql table data. It is more security for reading and writing data to external sql table.
    Here is a detailed article for your reference:
    https://technet.microsoft.com/en-us/library/ee661740(v=office.15).aspx
    https://msdn.microsoft.com/en-us/library/office/ee556440(v=office.14).aspx
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jerry Guo
    TechNet Community Support

  • Inserting records from Infopath forms library to a SQL table

    Hi,
    I have a requirement where i need to populate records from a Infopath forms library to a SQL table in a database. We have written a console app to achive the same. However we are encountering performance issues when inserting records in the database. The
    way we retreive information from Infopath forms library is through a CAML query and then insert record by record in database. Is their a better and faster way to acheive this?
    Can someone pls help? 
    thanks,
    Anand
    Thanks and Regards, Anand R. Deshpande

    Hello Anand,
    Could you share you console application code? Also tell us when you face performance issue. I mean is there any problem in accessing infopath form or you are facing problem with only console application.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • I need some working examples with pl/sql records and pl/sql tables.

    i am new to pl/sql tables and pl/sql records. i need some working examples on pl/sql records and pl/sql tables from basics to hoghlevel.how to use then procedures and functions and packages.

    i am new to pl/sql tables and pl/sql records. i need some working examples on pl/sql records and pl/sql tables from basics to hoghlevelThere is no such thing as PL/SQL "+tables+". This is a misnomer and creates the perception that a PL/SQL "table" is somewhat like a SQL table. Nothing can be further from the truth. The correct term is "+collection+" or "+associative array+". Compared to SQL tables, these are very primitive structures, very rigid structures, cannot scale, and can be quite expensive memory wise.
    That is not to say do not use an associative array or collection. These are very useful tools.. but only when applied correctly. Like using a collection for a bulk fetch to transfer more rows between the PL and SQL engines and thus decrease context switching.
    Unfortunately, quite often we see the row-by-row and slow-by-slow approach - where the developer uses SQL as an I/O only layer, pulls rows into expensive PL engine memory into record structures and arrays, and then process the rows there.
    So before looking at working example (even the wrong approach's code will compile and run and work in practice), make sure that you know the fundamentals of correctly using the PL engine and correctly using the SQL engine. And these fundamentals can be summed up into a very basic rule:
    Maximize SQL. Minimize PL/SQL+
    Get this rule right, and you will have a sound foundation for writing performant and scalable Oracle applications.

  • Global Temp Table or PL/SQL Table

    I am trying to determine if this can be done only using PL/SQL table. If not, will the usage of the global temp table affects the performance.
    Here is the situation,
    I have a data block that is based on a stored procedure. This stored procedure will return table of records from different database tables with join conditions. Some of the fields within the table of records will not have data returned from database tables. They will be the fields displayed on the form and the data will be entered by user.
    For example:
    Records will look like:
    Id          (will be populated by procedure)
    Hist_avg     (will be populated by procedure)
    My_avg     (will be used as field on the form so that user can enter their own avg)
    Cheked     (will be populated by procedure)
    My questions are:
    1.     Is this doable in form using a data block based on PL/SQL table?
    2.     Will users be able to manipulate (update) the data that based on the PL/SQL table in the memory as they wish and invoke the procedure to update the underlying table when clicking on a button (Update Avg)?
    3.     What is the advantage of using PL/SQL table and global temp table from database and form point of views?
    Any info is appreciated.

    Hi there...
    Here is the Reference...
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2939484874961025998::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:604830985638
    Best Regards...
    Muhammad Waseem Haroon

  • Array or Table of Records or...what is best for my scenario?

    I have been given task to trap last 5 action taken on a form application by user. This would be used where user gets a FRM or ORA error, dump last 5 steps to a table in the database along with error. Trapping FRM or ORA error is easy; I am wondering what & how should I note last 5 steps ( like, what page, what block & what form the user was clicking/entering data etc) when error occurred. I am planning to use when-mouse-click or some other triggers to capture the data; but at every action if I try inserting one record & deleting one record from the database table ( last one knocked out), there is going to be a lot of I/O & that table is going to be too hot. I am trying to avoid that unwanted I/O & keep those 5 steps info somewhere in forms till user gets a error. And, when he/she gets error, he/she can dump those 5 steps info along with error messages/number in a error table.
    My question is: what do I use? Array or Table of records..or something else. I have never used any of these & thought to discuss this before going deep into implementation.
    Any suggestion would be appreciated.
    Thanks.

    You could use a table of records or a record group. They both achieve similar results but with very different syntax. I am not sure if there is any difference in performance.
    Record groups are good for certain things like lists populated from the database because built-ins are provided for manipulating them. If you are going to do the manipulation programatically, I personally find the syntax for tables of records less cumbersome than record groups. Learning the syntax for tables of records is also likely to be more universally useful to you as they have various uses such as passing data between procedures.
    In your situation the table of records needs to exist throughout the forms session rather than just during the execution of a single pl/sql block. The way to do that is create a program unit which is a package header without a body. Declare the table in there and it can be used throughout the form.
    However, if you only ever want to keep 5 records, it would probably be easier just to have 5 ordinary items in a control block on the null canvas (or global variables). When you want to record your new action just do:
    :item5 := :item4;
    :item4 := :item3;
    :item3 := :item2;
    :item2 := :item1;
    :item1 := :new_stuff;
    You could even construct the above in a loop using
    copy(name_in('item'||i),'item'i+i)
    but with only 5 items to manipulate, is it worth the bother ?
    Whatever method you decide to use, you are not going to get anything simpler than 5 little assignment statements.

  • Select from table of records

    Hi,
    Inside of a stored procedure I created:
    - a record type:TYPE gr_rec IS RECORD (contact_id number)
    - a table of records: TYPE gr_tb IS table of gr_rec INDEX BY BINARY_INTEGER
    and then I populated the table in a loop: tb(i).contact_id := a.contact_id.
    My question is:
    Is it posible to perform a select statement on the table of records to get only distinct records?
    If not, how can I filter these records, as I use the procedure as a block data source in a form and I need only distinct records.
    Note: I can not obtain select rows from the query that populates the table.
    Thank you, Monica

    Look at this function:
    create or replace type TYP_REC_EMP as object
      EMPNO     NUMBER(4),
      ENAME     VARCHAR2(10),
      JOB       VARCHAR2(10),
      MGR       NUMBER(4),
      HIREDATE  DATE,
      SAL       NUMBER(7,2),
      COMM      NUMBER(7,2),
      DEPTNO    NUMBER(2)
    create or replace type TYP_TAB_REC_EMP is table of TYP_REC_EMP
    CREATE OR REPLACE FUNCTION Ret_Cur RETURN TYP_TAB_REC_EMP
    IS
      TAB TYP_TAB_REC_EMP := TYP_TAB_REC_EMP(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
      CURSOR C_EMP IS
      SELECT *
      FROM   EMP ;
      i PLS_INTEGER := 0 ;
    BEGIN
      FOR CEMP IN C_EMP LOOP
             TAB.extend ;
            i := i + 1 ;
            TAB(i) := TYP_REC_EMP
                            CEMP.EMPNO,
                             CEMP.ENAME,
                             CEMP.JOB,
                             CEMP.MGR,
                             CEMP.HIREDATE,
                             CEMP.SAL,
                             CEMP.COMM,
                             CEMP.DEPTNO
      END LOOP ;
      RETURN TAB ;
    END;
    /And the Sql*plus query :
    SQL*Plus: Release 9.0.1.3.0 - Production on Ve Mar 24 09:18:37 2006
    (c) Copyright 2001 Oracle Corporation.  All rights reserved.
    Connecté à :
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    SQL>
    SQL> SELECT DISTINCT(empno),deptno FROM TABLE(ret_cur()) WHERE deptno=20
      2  /
         EMPNO     DEPTNO
          7369         20
          7566         20
          7788         20
          7876         20
          7902         20
    SQL> Francois

  • Ps/sql Table in Forms

    Hi all ..
    I am using Forms 6i ....
    on WHEN-BUTTON-PRESSED Trigger i am calling a procedure ..
    pkg_test.display_proc( Code_ID     IN varchar2,
    keyword IN varchar2,
    v_tab_ret OUT tab_type )
    The procedure is returning a PL/SQL table type .... which consist of 5 fields.....
    Problem :- How can i display this v_tab_ret ( PL/SQL Table) in the Display Item in the form canvas ... This v_tab_ret is supposed to return variable number of rows depending on the conditions in the procedure ...
    Thanks ,

    HI,
    In forms6i, you can define the variable based on the PL/SQL table as you do in the packages.
    In the WHEN-BUTTON-PRESSED trigger, do the following
    DECLARE
    v_tab_ret tab_type
    BEGIN
    -- call your procedure:
    pkg_test.display_proc( Code_ID ,
    keyword,
    v_tab_ret
    -- Now you have the pl/sql table populated from the procedure.
    END;
    Depends on the type of block (single / multi record), you can decide how to manipulate and show the value you got in the PL/SQL tabe.
    Regards,
    Venkat

  • Can Crystal Report XI update data in a SQL Table

    Post Author: abidamin
    CA Forum: Data Connectivity and SQL
    Hi,
    I have a very specific requirement to update a flag field in one of SQL2005 database tables, I need to update a One character field with Y on all selected records printed on the report as a result of running the report successuflly.
    Can anyone let me know if it is possible to update a SQL table field using Crystal Report XI.
    Regards

    Post Author: SKodidine
    CA Forum: Data Connectivity and SQL
    Perhaps this KBase article can be of some help.
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2011921&sliceId=&dialogID=18608077&stateId=1%200%2018610053

Maybe you are looking for