SQL Types in Forms

Hi,
Are SQL Types supported in Oracle Forms 10.1.2.0.2 ?
Today I had a problem with them . I used a SQL type in forms , I compiled it, tested it, everything was fine but once I used a different database other than the one I used for the compilation, I start getting "ORA-06508 PL/SQL: could not find program unit being called" errors for my form's program unit in which I used the SQL type.
Anybody has an idea about this ?
Thanks

I meant the user defined sql types. Here is an example
CREATE OR REPLACE
TYPE myType AS OBJECT ( char_Column VARCHAR2(32000) )
CREATE OR REPLACE TYPE myTypeTable AS TABLE OF myType;Then In form
procedure myProc is
vMyTypeTable myTypeTable;
begin
null;--Some code here ..having the above decalarition is enough to reproduce the problem
end;

Similar Messages

  • Error while calling "sql Type" in forms

    Hi all,
    I have created a SQL TYPE in user schema and call it through form.While compiling form following error message arise:
    Implementation restriction [may be temporary] ADT or schema level collection not supported at client side with non-OCI mode.
    My user has dba rights and i m using 9.0.4.
    Any idea ???
    Regards

    All,
    The problem is in Oracle Forms. The PL/SQL engine in Forms is not the same as the PL/SQL Engine in the database. Consequently, there will be features available in the Database that are not available in Forms. I suggest you alter your design so it doesn't use a database TYPE. There are a few Metalink articles that discuss this difference.
    Craig..

  • Using PL/SQL Table in Forms

    Hi,
    I am populating a PL/SQL table by fetching data through a explicit cursor. But when i am accessing the PL/SQL table after population, i am getting a "NO DATA FOUND" error.
    I am attaching the Forms local progam units which have the logic.
    PACKAGE f_get_bike_makers IS
    TYPE prectype_maker_dtls_pll IS RECORD (
    country_code ad_bike_maker_details.abmd_country_code%TYPE,
    country_name table_values.tvs_description%TYPE,
    manu_code ad_bike_maker_details.abmd_manufacturer_code%TYPE,
    maker_name ad_bike_maker_details.abmd_maker_name%TYPE,
    maker_name_kana ad_bike_maker_details.abmd_maker_name_kana%TYPE,
    const_by ad_bike_maker_details.abmd_constructed_by%TYPE,
    const_time ad_bike_maker_details.abmd_construction_time%TYPE,
    update_by ad_bike_maker_details.abmd_updated_by%TYPE,
    update_time ad_bike_maker_details.abmd_updated_time%TYPE
    TYPE ptabtype_maker_dtls_pll IS TABLE OF prectype_maker_dtls_pll
    INDEX BY BINARY_INTEGER;
    FUNCTION f_get_bike_makers_pll RETURN ptabtype_maker_dtls_pll;
    END;
    PACKAGE BODY f_get_bike_makers IS
    FUNCTION f_get_bike_makers_pll
    RETURN ptabtype_maker_dtls_pll
    IS
    CURSOR cur_maker_dtls
    IS
    SELECT abmd.abmd_country_code,
    tvs.tvs_description,
    abmd.abmd_manufacturer_code,
    abmd.abmd_maker_name,
    abmd.abmd_maker_name_kana,
    abmd.abmd_constructed_by,
    abmd.abmd_construction_time,
    abmd.abmd_updated_by,
    abmd.abmd_updated_time
    FROM ad_bike_maker_details abmd,
    table_values tvs
    WHERE abmd.abmd_country_code = tvs.tvs_code
    AND tvs.tvs_tad_code = 'COUNTRIES'
    ORDER BY abmd.abmd_country_code;
    ln_tab_index BINARY_INTEGER := 0;
    ltab_maker_dtls ptabtype_maker_dtls_pll;
    BEGIN
    FOR lcur_maker_dtls IN cur_maker_dtls
    LOOP
    ln_tab_index := ln_tab_index + 1;
    ltab_maker_dtls (ln_tab_index) := lcur_maker_dtls;
    END LOOP;
    RETURN ltab_maker_dtls;
    END f_get_bike_makers_pll;
    END;
    PROCEDURE f_populate_maker_names
    IS
    ltab_maker_dtls f_get_bike_makers.ptabtype_maker_dtls_pll;
    lb_record_group BOOLEAN;
    ln_ltab_maker_dtls_index BINARY_INTEGER;
    BEGIN
    -- read all the vehicle types from table_values
    -- get makers and countries
    ltab_maker_dtls := f_get_bike_makers.f_get_bike_makers_pll ;
    DELETE_GROUP_ROW ('REC_MAKER_NAME', all_rows);
    ln_ltab_maker_dtls_index := ltab_maker_dtls.FIRST;
    begin
    WHILE ln_ltab_maker_dtls_index IS NOT NULL
    LOOP
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'ABMD_MANUFACTURER_CODE',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).manu_code,
    ln_ltab_maker_dtls_index
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'ABMD_MAKER_NAME',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).maker_name,
    ln_ltab_maker_dtls_index
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'COUNTRY_NAME',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).country_name,
    ln_ltab_maker_dtls_index
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'ABMD_COUNTRY_CODE',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).country_code,
    ln_ltab_maker_dtls_index
    ln_ltab_maker_dtls_index := ltab_maker_dtls.NEXT (ln_ltab_maker_dtls_index);
    end;
    END LOOP;
    exception when no_data_found then
    message('ln_ltab_maker_dtls_index :'||ln_ltab_maker_dtls_index);
    message(' ');
    end;
    ltab_maker_dtls.DELETE;
    END;
    SQL> desc ad_bike_maker_details
    Name Null? Type
    ABMD_COUNTRY_CODE NOT NULL VARCHAR2(2)
    ABMD_MANUFACTURER_CODE NOT NULL VARCHAR2(2)
    ABMD_MAKER_NAME VARCHAR2(60)
    ABMD_MAKER_NAME_KANA VARCHAR2(60)
    ABMD_CONSTRUCTED_BY NOT NULL VARCHAR2(20)
    ABMD_CONSTRUCTION_TIME NOT NULL DATE
    ABMD_UPDATED_BY VARCHAR2(20)
    ABMD_UPDATED_TIME DATE
    SQL> desc table_values
    Name Null? Type
    TVS_TAD_CODE NOT NULL VARCHAR2(15)
    TVS_CODE NOT NULL VARCHAR2(15)
    TVS_DESCRIPTION NOT NULL VARCHAR2(70)
    Oracle Database Version
    =======================
    Oracle8 Enterprise Edition Release 8.0.6.1.0 - Production
    PL/SQL Release 8.0.6.1.0 - Production
    Forms Version
    ==============
    Forms [32 Bit] Version 5.0.6.8.0 (Production)
    PL/SQL Version 2.3.4.0.0 (Production)
    Please do let know what could be the possible source of error.
    Thanks in advance.
    Nitin

    But we have to use the PL/SQL table as per our design standards.
    We are implementing the population logic of the PL/SQL table in the database as a
    package function. We are then accessing the PL/SQL table in Forms to populate the record group.It is curious that you would have such a unique requirement -- something that might make forms run a tiny bit faster -- yet you are using an ancient version of Forms.
    Also the "NO DATA FOUND" error is not raised everytime the PL/SQL table is accessed.
    What could be the reason for this erratic behaviour?I wonder if there may be a bug in SQL Net in the Oracle-to-Forms communication where PL/SQL tables are passed as out parameters. I know there is one in Web Forms 6 (6.0.8.19.1) when passing a pl/sql table from the form to Oracle -- I had to write the pl/sql table to a database table to get my process to work.

  • What is the maximum length of LONG data type in Forms 6i?

    What is the maximum length of LONG data type in Forms 6i?

    Do you mean the maximum size of a LONG that Forms 6i can display or the maximum size that can be stored in the database which sits behind your Forms application?
    Regards, APC

  • SQL types over PLSQL types while using Oracle Applications adapter in BPEL

    Use SQL types over PL/SQL types while using Oracle Applications adapter
    in BPEL/ ESB
    This document will be focusing on Oracle Applications adapter. However Database adapter is much like OA adapter (even OA adapter uses DB Adapter), so the readers who are interested to explore DB adapters, can relate things with this document and go further as well.
    Some Guidelines for writing PL/SQL APIs for OA Adapter
    As we know when we create a partner link from the OA adapter wizard it sometimes writes some wrapper script supportive to the OA Adapter WSDL which contains below
    * Object type for PL/SQL RECORD
    * Nested table of the given type for PL/SQL TABLE. For example, the nested table of NUMBER.
    * INTEGER substituted for PL/SQL BOOLEAN
    * Wrapper Script for converting above three set of data types . (PLSQL to SQL and SQL to PLSQL conversion functions)
    In runtime this wrapper script for converting PL/SQL to SQL and SQL to PL/SQL is an extra overhead.
    So the first advice would be to avoid the use of the below as parameters of PLSQL API being called by OA Adapter.
    * PL/SQL RECORD
    * PL/SQL TABLE. For example, the nested table of NUMBER.
    * PL/SQL BOOLEAN
    In other way we can say we should try to use only SQL data types in arguments if we are planning to call any PL/SQL API from the OA Adapter.
    If the requirement is to use a table or record uses the Object type. In place of BOOLEAN better to use VARCHAR or INTEGER what ever fulfills your requirement. Following this guideline we can reduce a huge number of Line of codes to be run each time the adapter being called.
    Generally, Oracle E-Biz standard APIs use PL/SQL record types and table types so when there is a requirement to call these API’s from OA Adapter (this is a common requirement in development), and if we directly browse the API in OA Adapter Configuration Wizard and create the partner link, again a huge number of code is written by the wizard in the wrapper script (a number of extra mapping of fields which are not being used in the interface).
    In this case better would be to create an Object type with only the required fields which are being used in that call and use them as parameters for the PLSQL API.

    Find the complete document
    http://www.4shared.com/file/167171882/29525116/Use_SQL_types_over_PLSQL_types.html

  • Adding new element to BPEL for use in PL SQL type, has binding errors

    Figured I might as well post this here since I haven't gotten a single reply in 3 days anywhere else :/
    I have a BPEL service that calls a PL SQL procedure. I have added a new element to the BPEL called quote_cart_line.
    All I had to the BPEL to accomplish this was edit 3 files -
    Async_Invoke_Import_Model.xsd (Source)
    <element name="orig_sys_line_ref" type="integer" minOccurs="1" nillable="true"/>
           <element name="quote_cart_line" minOccurs="1" nillable="true" type="integer"/>
          </sequence>
    .....APPS_NI_MODEL_IMPORT_UTIL_IMPORT_SELECTIONS.xsd (Target)
    <element name="ORIG_SYS_LINE_REF" type="decimal" db:type="NUMBER" minOccurs="0" nillable="true"/>
             <element name="QUOTE_CART_LINE" type="decimal" db:type="NUMBER" minOccurs="0" nillable="true"/>
          </sequence>
    .....Transform_NIE_Inputs.xsl (Transforming from Source to Target)
    <ns1:orig_sys_line_ref>
              <xsl:value-of select="/ns1:Async_Invoke_Import_ModelProcessRequest/ns1:import_line/ns1:orig_sys_line_ref"/>
            </ns1:orig_sys_line_ref>
            <ns1:quote_cart_line>
              <xsl:value-of select="/ns1:Async_Invoke_Import_ModelProcessRequest/ns1:import_line/ns1:quote_cart_line"/>
            </ns1:quote_cart_line>
          </ns1:import_line>
    .....I have done this to two other BPELs and they work fine. (1st BPEL calls the second BPEL passing this new element, which then passes it to this BPEL I am having trouble with, which then should be binding it to a PL SQL type)
    So this BPEL calls a PL SQL procedure, binding the elements from the BPEL to a PL SQL type (ni_model_import_line). So I edited the PL SQL type to accept this new parameter:
    orig_sys_header_ref       NUMBER,
           quote_cart_line           NUMBER,
           CONSTRUCTOR FUNCTION ni_model_import_line(p_part_number                IN VARCHAR2,
    MEMBER PROCEDURE add_orig_sys_header_ref(p_org_sys_header_ref          IN NUMBER),
           MEMBER PROCEDURE add_quote_cart_line(p_quote_cart_line                 IN NUMBER)
    MEMBER PROCEDURE add_quote_cart_line(p_quote_cart_line                 IN NUMBER) IS
    BEGIN
       quote_cart_line := p_quote_cart_line;
    END add_quote_cart_line;
    END;
    .....I invoke all of this, and the new element gets populated in 3 different BPELs, including this one I explained here. But when it comes time to call the PL SQL I am now getting an error:
    <fault>
    -<bpelFault>
    <faultType>0</faultType>
    -<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'nie_import_2' failed due to: Interaction processing error.
    Error while processing the execution of the APPS.NI_MODEL_IMPORT_UTIL.IMPORT_SELECTIONS API interaction.
    An error occurred while processing the interaction for invoking the APPS.NI_MODEL_IMPORT_UTIL.IMPORT_SELECTIONS API. Cause: java.lang.NullPointerException
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </summary>
    </part>
    -<part name="detail">
    <detail>null</detail>
    </part>
    -<part name="code">
    <code>null</code>
    </part>
    </bindingFault>
    </bpelFault>
    </fault>This doesnt happen if I remove the references to this new element and try again, so it obviously is a problem with the element, but I have no idea what it is. It works fine when going from BPEL to BPEL, but as soon as the process tries to call the PL SQL procedure this happens. It is even more frustrating because I have done this exactly before adding another element, and it worked fine...
    Any ideas or tips please?

    Figured I might as well post this here since I haven't gotten a single reply in 3 days anywhere else :/
    I have a BPEL service that calls a PL SQL procedure. I have added a new element to the BPEL called quote_cart_line.
    All I had to the BPEL to accomplish this was edit 3 files -
    Async_Invoke_Import_Model.xsd (Source)
    <element name="orig_sys_line_ref" type="integer" minOccurs="1" nillable="true"/>
           <element name="quote_cart_line" minOccurs="1" nillable="true" type="integer"/>
          </sequence>
    .....APPS_NI_MODEL_IMPORT_UTIL_IMPORT_SELECTIONS.xsd (Target)
    <element name="ORIG_SYS_LINE_REF" type="decimal" db:type="NUMBER" minOccurs="0" nillable="true"/>
             <element name="QUOTE_CART_LINE" type="decimal" db:type="NUMBER" minOccurs="0" nillable="true"/>
          </sequence>
    .....Transform_NIE_Inputs.xsl (Transforming from Source to Target)
    <ns1:orig_sys_line_ref>
              <xsl:value-of select="/ns1:Async_Invoke_Import_ModelProcessRequest/ns1:import_line/ns1:orig_sys_line_ref"/>
            </ns1:orig_sys_line_ref>
            <ns1:quote_cart_line>
              <xsl:value-of select="/ns1:Async_Invoke_Import_ModelProcessRequest/ns1:import_line/ns1:quote_cart_line"/>
            </ns1:quote_cart_line>
          </ns1:import_line>
    .....I have done this to two other BPELs and they work fine. (1st BPEL calls the second BPEL passing this new element, which then passes it to this BPEL I am having trouble with, which then should be binding it to a PL SQL type)
    So this BPEL calls a PL SQL procedure, binding the elements from the BPEL to a PL SQL type (ni_model_import_line). So I edited the PL SQL type to accept this new parameter:
    orig_sys_header_ref       NUMBER,
           quote_cart_line           NUMBER,
           CONSTRUCTOR FUNCTION ni_model_import_line(p_part_number                IN VARCHAR2,
    MEMBER PROCEDURE add_orig_sys_header_ref(p_org_sys_header_ref          IN NUMBER),
           MEMBER PROCEDURE add_quote_cart_line(p_quote_cart_line                 IN NUMBER)
    MEMBER PROCEDURE add_quote_cart_line(p_quote_cart_line                 IN NUMBER) IS
    BEGIN
       quote_cart_line := p_quote_cart_line;
    END add_quote_cart_line;
    END;
    .....I invoke all of this, and the new element gets populated in 3 different BPELs, including this one I explained here. But when it comes time to call the PL SQL I am now getting an error:
    <fault>
    -<bpelFault>
    <faultType>0</faultType>
    -<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'nie_import_2' failed due to: Interaction processing error.
    Error while processing the execution of the APPS.NI_MODEL_IMPORT_UTIL.IMPORT_SELECTIONS API interaction.
    An error occurred while processing the interaction for invoking the APPS.NI_MODEL_IMPORT_UTIL.IMPORT_SELECTIONS API. Cause: java.lang.NullPointerException
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </summary>
    </part>
    -<part name="detail">
    <detail>null</detail>
    </part>
    -<part name="code">
    <code>null</code>
    </part>
    </bindingFault>
    </bpelFault>
    </fault>This doesnt happen if I remove the references to this new element and try again, so it obviously is a problem with the element, but I have no idea what it is. It works fine when going from BPEL to BPEL, but as soon as the process tries to call the PL SQL procedure this happens. It is even more frustrating because I have done this exactly before adding another element, and it worked fine...
    Any ideas or tips please?

  • How to restrict LOV to a particular project type through form personalize.

    Hi,
    I got a requirement to restrict LOV to a particular Project type through form personalization in project accounting module. form name: PAXPREPR
    i tried the below code in Builtin, but it didn't work
    SELECT distinct PROJ.SEGMENT1, PROJ.NAME,
    PROJ.DESCRIPTION, PROJ.PROJECT_ID
    FROM PA_PROJECTS_ALL PROJ,
    PA_PROJECT_TYPES_ALL TYPES,
    pa_proj_elements ppe,
    pa_proj_structure_types ppst,
    pa_structure_types pst
    WHERE PROJ.TEMPLATE_FLAG <> 'Y'
    AND PROJ.PROJECT_TYPE = TYPES.PROJECT_TYPE
    AND TYPES.CC_PRVDR_FLAG <> 'Y'
    AND proj.project_id = ppe.project_id
    and ppe.object_type = 'PA_STRUCTURES'
    and ppe.proj_element_id = ppst.proj_element_id
    and ppst.structure_type_id = pst.structure_type_id
    and pst.structure_type = 'FINANCIAL'
    and proj.project_type = 'GRANT'
    order by PROJ.SEGMENT1
    please suggest me where i went wrong.
    Edited by: 925049 on Apr 3, 2012 2:49 PM

    In the Control Data of FS00 there is field 'Authorization Group'
    Please Create an Authorization Group for those user ID who can post TDS entries.
    then Maintain this group for TDS related GL.
    Then others will not able to post to this GL.
    Regards,
    Alok

  • Need help on Dynamic SQL Cursor in Forms

    Hi All,
    I am trying to execute Dynamic SQL Cursor in forms using EXEC_SQL built in.
    I have a cursor for example:
    'select * from supplier where supplier = '||p_supplier||' and processing_order = '||p_order
    My code is
    cur_num := Exec_SQL.Open_cursor;
    sql_order := 'select * from supplier where supplier = '||p_supplier||' and processing_order = '||p_order;
    EXEC_SQL.PARSE(cursor_number, sql_order);
      EXEC_SQL.DEFINE_COLUMN(cur_num ,1,ln_Supp_Id);
      EXEC_SQL.DEFINE_COLUMN(cur_num ,2,ls_Suppl_Name,30);
    EXEC_SQL.DEFINE_COLUMN(cur_num ,24,ls_exchange,20);
      sql_count := EXEC_SQL.EXECUTE(cur_num );
      While EXEC_SQL.FETCH_ROWS(cur_num ) > 0 Loop
            EXEC_SQL.COLUMN_VALUE(cur_num ,1,ln_Supp_Id);
            EXEC_SQL.COLUMN_VALUE(cur_num ,2,ls_Suppl_Name);
            EXEC_SQL.COLUMN_VALUE(cur_num ,24,ls_exchange);
    End Loop;
    EXEC_SQL.CLOSE_CURSOR(cur_num );
    In this case I have to write 24 Define Columns and 24 Column value. Is there any way to assign them to %rowtype at one time as I need all coulmn of the table.
    I had similar case on multiple tables.
    Please help me
    Thanks,
    Maddy

    I need this dynamic sql because p_supplier and p_order values changes at run time
    I do not understand. Is this a simplified sample or the real thing? You do know that you can pass variables to cursors:
    cursor test is
    select * from supplier where supplier = p_supplier and processing_order = p_order;
    or does e.g. p_supplier hold other parts of the query?
    cheers

  • How to give a value in Token when Conc prog method registered as pl/sql typ

    Hi
    We have a report which will generate invoices for a given Operating Unit at one time.i.e Conc Prog1
    We have a customised pl/sql package which submits the above report conc prog for all Operating Units with the required parameters for the report.i.e Conc Prog2
    When i saw the conc prog2 somehow values has been entered TOKEN field eventhough the conc prog method is pl/sql.this was done earlier than me who developed this intially.
    Now i need to include one parameter to this concprog2.when i try to include a parameter to it the TOKEN filed is grayed out(not updatable/eneterable a value).
    So could anyone please tell me how i can add a parameter with token value for pl/sql type method conc progs.
    Thanks,
    Malla

    Hi parag,
    You mean to say i have to write like this :--
    if (pageContext.getParameter("apply")!=null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject accountsViewObject =
    (OAViewObject)am.findViewObject("ArBusPurAllVO");
    if (accountsViewObject!=null)
    OARow row = (OARow) accountsViewObject.getCurrentRow();
    if (row.getAttribute("GlIdRev") == null || row.getAttribute("GlIdRev").equals(""))
    //call your function here and say row.setaatribbute= revenue_acct_id from your function.
    if(s8.equalsIgnoreCase("BILL_TO")) {
    try {
    Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
    String Query = "select SDS_CUST_BILL_INFO(:1,2) from dual";
    PreparedStatement stmt = conn.prepareStatement(Query);
    stmt.setInt(1, orgid);
    ResultSet resultset = stmt.executeQuery();
    if(resultset.next()) {
    String revenuenum = resultset.getString(1);
    row.setaatribbute(revenuenum) ;
    } catch(SQLException se) {
    se.printStackTrace();
    throw new OAException("Error in Staffing Query"+se, OAException.ERROR);
    if (row.getAttribute("GlIdRec") == null || row.getAttribute("GlIdRec").equals(""))
    //call your function here and say row.setaatribbute=rec_acct_id from your function.
    if(s8.equalsIgnoreCase("BILL_TO")) {
    try {
    Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
    String Query = "select SDS_CUST_BILL_INFO(:1,2) from dual";
    PreparedStatement stmt = conn.prepareStatement(Query);
    stmt.setInt(1, orgid);
    ResultSet resultset = stmt.executeQuery();
    if(resultset.next()) {
    String receivablenum = resultset.getString(1);
    row.setaatribbute(receivablenum) ;
    } catch(SQLException se) {
    se.printStackTrace();
    throw new OAException("Error in Staffing Query"+se, OAException.ERROR);
    super.processFormRequest(pageContext, webBean);
    Am I, correct parag please tell me, if this works i will send u mail again that it is working fine .
    my mail id is [email protected]

  • DBMS_SQL.PARSE with PL/SQL types

    Hi
    I need to use DBMS_SQL.PARSE with PL/SQL types defined in a package.
    I tried with a type record in a declare ..begin..end  script but I got an error ..(on second parameter):
    DBMS_SQL.PARSE(cursor_name, XXXXX, DBMS_SQL.NATIVE);
    It's possible?
    WIth SQL types defined at schema level it's works (es. Objects types) .
    If it's not possible, how can I resolve?
    Stefano

    Again, please post what XXXXX is. In order to use package declared types:
    SQL> create or replace
      2    package pkg1
      3      is
      4        type emp_rec
      5          is record (
      6                     empno number,
      7                     ename varchar2(10)
      8                    );
      9        type emp_rec_tbl
    10          is
    11            table of emp_rec
    12            index by pls_integer;
    13        g_emp_rec_tbl pkg1.emp_rec_tbl;
    14  end;
    15  /
    Package created.
    SQL> declare
      2      v_cur integer;
      3      v_sql varchar2(1000);
      4  begin
      5      v_cur := dbms_sql.open_cursor(2);
      6      v_sql := 'begin
      7                    select  empno,
      8                            ename
      9                      bulk  collect
    10                       into  pkg1.g_emp_rec_tbl
    11                       from  emp
    12                       where job = ''CLERK'';
    13                end;';
    14      dbms_sql.parse(
    15                     v_cur,
    16                     v_sql,
    17                      dbms_sql.native
    18                     );
    19  end;
    20  /
    PL/SQL procedure successfully completed.
    SQL>
    SY.

  • How to use PL/SQL type table in SQL FROM clause

    Hi All,
    I have to use a PL/SQL type table in our SQL statement as a table?
    I am using the syntax (below) but it gives PL/SQL: ORA-00902: invalid datatype
    SELECT ... FROM TABLE(CAST( var_pl/sql_table AS pl/sql_table)) tab WHERE tab.a=1;
    Plz reply with an example.
    Thanks.. Ratan

    You don't need a cast!!!
         select *
         from table ( <nested_table> )
         where <condition>Anyway, are you sure that tab.a is a number?
    Here follows an example with an useful function
    CREATE OR REPLACE
    type string_table  as table of varchar2(4000)
    CREATE OR REPLACE
    FUNCTION split_string (
         string IN varchar2,
         delimiter IN varchar2
    ) RETURN  string_table IS
         tab string_table;
         pre integer;
         post integer;
         step integer;
         i integer;
    BEGIN
         pre := 1;
         step := length(delimiter);
         i := 0;
         tab := string_table();
         loop
              tab.extend;
              i := i + 1;
              post := instr(string,delimiter,pre);
              if ( post = 0 ) then
                   tab(i) := substr(string,pre);
                   return tab;
              end if;
              tab(i) := substr(string,pre,post-pre);
              pre := post + step;
         end loop;
    END;
    select * from table (split_string('abc,dfg,hij',','))
    Query finished, retrieving results...
                                      COLUMN_VALUE                                  
    abc                                                                             
    dfg                                                                             
    hij                                                      

  • There are no readers registered for the sql type.

    SQL Developer 4.0
    I added .sql and .ldr as file types via Tools > Preferences > File Types.
    When I try to open the export.sql file in SQL Developer using the "Import Data" option I get the message:
    There are no readers registered for the sql type.
    I can open the file with SQL Server Management Studio and see all of the insert statements that i would expect to see.
    When I created the export.sql file using the Export Wizard with "Format: insert" I received a message:
    "export.sql was not opened because it exceeds the maximum automatic open size."
    Can this limit be changed?

    The import data dialog is for taking a CSV/XLS/TXT type file.
    If you used the Export Wizard, you can now just run that file in the worksheet.

  • Java.sql.types and oracletypes

    There appear to be difference in the way the constants are mapped in java.sql.types vs oracletypes(). For example date is '91' in oracletypes and '93' in java.sql.types. The DatabaseMetaData.getColumns() function reports data_type as a java.sql.type. Is there any mapping available from one to the other.
    Thanks

    Erm,
    One way to find out, I reckon.
    Good Luck,
    Avi.

  • MS SQL - sql type for Cursor

    Hello,
    Please help. I am using weblogic 8.1 and MS SQL Server 2000. Using JDBC. I have am calling a stored procedure which outputs a CURSOR. I haveing problems specifying the right java.sql.Type for this. I tried java.sql.Type.OTHER but it fails. The code is as follows
    I am planning to return more cursors from the Stored Procedures.
    ====
    Connection conn = null;
    CallableStatement stmt = null;
    String sqlProc = "{ call GetDocumentDetails(?,?) }";
    try {
    conn = this.getConnection();               
    stmt = conn.prepareCall(sqlProc);
    stmt.setInt(1, docId);
    stmt.registerOutParameter(2,Types.OTHER);
    stmt.execute();
    ResultSet rs = (ResultSet) stmt.getObject(2);
    while(rs.next()) {
    The exception that I get is
    java.sql.SQLException: [BEA][SQLServer JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
    PLEASE HELP.

    Hello,
    Please help. I am using weblogic 8.1 and MS SQL Server 2000. Using JDBC. I have am calling a stored procedure which outputs a CURSOR. I haveing problems specifying the right java.sql.Type for this. I tried java.sql.Type.OTHER but it fails. The code is as follows
    I am planning to return more cursors from the Stored Procedures.
    ====
    Connection conn = null;
    CallableStatement stmt = null;
    String sqlProc = "{ call GetDocumentDetails(?,?) }";
    try {
    conn = this.getConnection();               
    stmt = conn.prepareCall(sqlProc);
    stmt.setInt(1, docId);
    stmt.registerOutParameter(2,Types.OTHER);
    stmt.execute();
    ResultSet rs = (ResultSet) stmt.getObject(2);
    while(rs.next()) {
    The exception that I get is
    java.sql.SQLException: [BEA][SQLServer JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
    PLEASE HELP.

  • What may be the cause of this error java.sql.SQLException: invalid sql type passed to callable statement in iplanet ussing JNDI

     

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

Maybe you are looking for

  • G505s random cpu throttling!

    This is really frustrating, my cpu can't decide what frequency it should be at when I'm running fullscreen applications. It keeps jumping between 900, 1400, and 2500 mhz. No this isn't the charging issue and my bios is 2.05. The other issue I have is

  • BAT 5.1(4) won't update phones using a custom file

    Hi all - I'm trying to use BAT 5.1(4) to change the device pool of a number of 7912 handsets on CCM 4.1(3) using a custom file with a list of the extensions affected. I set the query up and it works fine, but when I then try to change the device pool

  • Hi yesterday I and my companion stopped working and function imessedge facetime?

    Hi yesterday I and my companion stopped working and function imessedge facetime?

  • No internet on Windows 7

    Hi, I just downloaded Windows 7 onto my 17'' Macbook pro via boot camp, however when in Windows it doesn't pick up any wireless networks to even attempt to connect too. However, when in Mac it automatically connects to the wireless connection in my h

  • How to create Search help for the field /SAPSLL/PRGEN-ATTR20V

    Hi , I need to add a search help for the field /SAPSLL/PRGEN-ATTR20V and their is a chk table used for this field is /SAPSLL/TCOATV20. In this table /SAPSLL/TCOATV20-ATTRV20V is a Primary key field. How can I add search help for this field? Any sugge