Stored Procedure with Table as data type , DBAdapter  configuration

i have a stored procedure .
XXyyyy_QP_PKG.XXyyyy_QP_PRICE_BOOK_PUB(l_xxyyy_prc_dtl_tbl,l_xxyyy_prc_brk_tbl,l_status,'New',5840,'New');
where l_xxyyy_prc_dtl_tbl ,l_xxyyy_prc_brk_tbl are the tables as output parameter.
Steps Performed for above scenario :
i have created database adapter using stored procedure configuration, that created a Wrapper procedure during the configuration in Oracle DB.
and thus i can find bpel_*******Create.sql and bpel_*******DROP.sql files got created .
When i actually gone on package which crted by dbadapter , that are errored out , then i have manually droped and ran the create script .
create script will results in some compilation erors of procedure .
How can i fix this problem ? If i have same scenario which is for ORacle API using Oracle Apps adapter that creates correct wrapper procedure .
how all these can be achieved .
Not sure whther this DBAdapter really works in these scenarios or not .
Edited by: anantwag on Dec 13, 2012 3:29 AM

These are the errors iam getting .
But the Existing Stored Procedure which needs to be exposed , works fine on sqlplus.
Errors: check compiler log
8/12 PLS-00302: component 'DETAIL' must be declared
8/3 PL/SQL: Statement ignored
9/12 PLS-00302: component 'LIST_NAME' must be declared
9/3 PL/SQL: Statement ignored
10/12 PLS-00302: component 'BREAK_TYPE' must be declared
10/3 PL/SQL: Statement ignored
11/12 PLS-00302: component 'DESCRIPTION' must be declared
11/3 PL/SQL: Statement ignored
12/12 PLS-00302: component 'ADJUSTMENT_METHOD' must be declared
12/3 PL/SQL: Statement ignored
13/12 PLS-00302: component 'ADJUSTMENT_VALUE' must be declared
13/3 PL/SQL: Statement ignored
20/33 PLS-00302: component 'DETAIL' must be declared
20/3 PL/SQL: Statement ignored
21/36 PLS-00302: component 'LIST_NAME' must be declared
21/3 PL/SQL: Statement ignored
22/37 PLS-00302: component 'BREAK_TYPE' must be declared
22/3 PL/SQL: Statement ignored
23/38 PLS-00302: component 'DESCRIPTION' must be declared
23/3 PL/SQL: Statement ignored
Commit
Edited by: anantwag on Dec 13, 2012 10:39 AM

Similar Messages

  • How to change stored procedure with Table Valued Parameter

    I am not sure how to change the normal stored procedure with Table Value Parameter.Do I have to create a separate Table or do I have to create a datatype. Can you please help me with this
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF]
    @dp_id char(32),
    @dv_id char(32),
    @em_number char(12),
    @email varchar(50),
    @emergency_relation char(32),
    @option1 char(16),
    @status char(20),
    @em_id char(35),
    @em_title varchar(64),
    @date_hired datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    MERGE [dbo].[em] AS [Targ]
    USING (VALUES (@dp_id, @dv_id , @em_number, @email, @emergency_relation, @option1, @status, @em_id, @em_title, @date_hired))
    AS [Sourc] (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired)
    ON [Targ].em_id = [Sourc].em_id
    WHEN MATCHED THEN
    UPDATE
    SET dp_id = [Sourc].dp_id,
    dv_id = [Sourc].dv_id,
    em_number = [Sourc].em_number,
    email = [Sourc].email,
    emergency_relation = [Sourc].emergency_relation,
    option1 = [Sourc].option1,
    status = [Sourc].status,
    em_title = [Sourc].em_title,
    date_hired = [Sourc].date_hired
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title,date_hired)
    VALUES ([Sourc].dp_id, [Sourc].dv_id, [Sourc].em_number, [Sourc].email, [Sourc].emergency_relation, [Sourc].option1, [Sourc].status, [Sourc].em_id, [Sourc].em_title, [Sourc].date_hired);
    END;

    It's not clear how you would change the procedure. But assuming that you want to replace the existing scalar parameters with tabular input, this is how you would do it. You first create a table type:
    CREATE TYPE  Insertor_type AS TABLE
        (dp_id                char(32),
         dv_id                char(32),
        em_number            char(12),
        email                varchar(50),
        emergency_relation   char(32),
        option1              char(16),
        status               char(20),
        em_id                char(35),
        em_title             varchar(64),
        date_hired           datetime)
    Then you change the procedure header:
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF] @tvp Insertor_type READONLY AS
    And finally you change the USING clause:
       USING (SELECT dp_id, dv_id , em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired
              FROM   @tvp) AS [Sourc] ON [Targ].em_id = [Sourc].em_id
    The rest is fine as it is.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Urgent: unable to call a plsql stored procedure with a struts data action

    Hello ALL,
    I'm trying to call a plsql stored procedure within a struts DataAction,
    The scenario is:
    When a user a click on a button, then it should call a specific stored procedure,,
    I create struts data action a class to handle the event which is to call the procedure
    Here is my code:
    public class RequestAction extends DataForwardAction
    public void onCall(DataActionContext ctx)
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    try{
    AppModuleImpl myAm = (AppModuleImpl)am;
    DBTransaction tr = (DBTransaction) myAm.getTransaction();
    CallableStatement stmt = tr.createCallableStatement
    ("begin pkg_test.test; end;", DBTransaction.DEFAULT);
    stmt.execute();
    stmt.close();
    tr.commit();
    catch(Exception e){System.out.println(e.getMessage());}
    Configuration.releaseRootApplicationModule(am,true);
    but when I ran the application and click on the button, I got the following Exception:
    04/07/08 00:45:50 ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PKG_TEST.TEST' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It seems that the DBTransaction object unable to see the stored procedure,
    Am I do something wrong or miss something???
    I've checked the examples on the OTN HOW TO, and searched in the JDeveloper Forum but unable to find an answer,
    Please anyone can help???
    Thanks a lot
    With Regards,
    Hayat

    Here's an example application that illustrates how to do this. I haven't had a chance to writeup a little paper to go with it yet, but will as soon as I have a chance.
    http://otn.oracle.com/products/jdev/tips/muench/storedproc/CallStoredProc.zip
    See the "callStoredProcedure" method in the application module in the Model project.
    See the "callStoredProcedure" method binding in the binding container of the "CallStoredProcedure" data page.
    Notice the name "event_callStoredProcedure" of the (Call Stored Procedure) button on the CallStoredProcedure.jsp page which triggers the declaratively invocation of the method.
    You could also call the method from code in a custom data action.
    The code example illustrates how to create your own JDBC prepared statement for invoking the stored procedure, and doing it in a way that is efficient by keeping the prepared statement around across invocations.

  • Calling Stored Procedure with table type as In parameter from Java

    Hi Everyone,
    Can anyone help me with the sample code to call a stored procedure having input parameter of Table type (consisting of multiple fields) from Java. This job is currently being done by a BPEL process.
    We want to implement the same using Java.
    Any sample code will be really helpful.
    Thanks & Regards,
    Vikas

    To start using a blob you have to insert it into the database and then get it back. Sounds weird but that is how it is. Here is a very simple program to do this:
    #include<occi.h>
    #include <iostream>
    using namespace oracle::occi;
    using namespace std;
    int main()
      try
        Environment *env = Environment::createEnvironment(Environment::OBJECT);
        Connection *conn = env->createConnection("hr","hr","");
        string stmt1 = "insert into blob_tab values (:1) ";
        string stmt2 = "select col1 from blob_tab";
        Blob blob(conn);
        blob.setEmpty(conn);
        Statement *stmtObj = conn->createStatement(stmt1);
        stmtObj->setBlob(1,blob);
        stmtObj->executeUpdate();
        conn->commit();
        Blob blob1(conn);
        Statement *stmtObj2 = conn->createStatement(stmt2);
        ResultSet *rs = stmtObj2->executeQuery();
        while(rs->next())
         blob1 = rs->getBlob(1);
        string stmt3 = "begin my_proc(:1) ;end;";
        Statement *stmtObj3 =  conn->createStatement(stmt3);
        stmtObj3->setBlob(1,blob1);
        stmtObj3->executeUpdate();
      catch (SQLException e)
        cout << e.getMessage();
      /* The tables and procedure are primitive but ok for demo
        create table blob_tab(col1 blob);
        create or replace procedure my_proc(arg in blob)
        as
        begin
         -- just a putline here. you can do other more meaningful operations with the blob here
          dbms_output.put_line('hello');
       end;
    }Hope this helps.
    Thanks,
    Sumit

  • Create stored procedure with table from another schema throws PLS-00201

    Oracle 10g. I'm new to procedures, so maybe I'm missing something obvious.
    Schema owner ABC has table T2001_WRITEOFF. The SYSDBAs granted SIUD to Some_Update_Role, and granted that role to developer user IJK. User IJK then created a private synonym T2001_WRITEOFF for ABC.T2001_WRITEOFF. This worked with normal SQL DML commands. 
    When I try to create a simple procedure as follows, it throws PLS-00201 identifier 'T2001_WRITEOFF' must be declared, and points to the 2nd line.
    create or replace procedure woof1(
      fooname in T2001_WRITEOFF.territory%TYPE,  <=== error points here
      bardesc IN T2001_WRITEOFF.ind_batch_submit%TYPE) IS
    BEGIN
       INSERT into T2001_WRITEOFF
       VALUES ( fooname, bardesc);
    END woof1;
    What am I doing wrong?
    Thanks
    JimR

    Hi,
    The reason I've heard has to do with knowing when a procedure becomes invalid due to privileges being revoked.  Any time a grant to a role is revoked, you would have to check all procedures that depended on that role to know if they were still valid.  Even worse, since roles can be granted to other roles, every time a role is revoked from another role, you would have to check all procedures that depended on anything to see if they were still valid.
    Oracle 11 behaves the same as earlier versions in this regard, and I don't expect this to change.
    This whole thread applies only to AUTHID DEFINER stored procedures (which is the default).  If you can make the procedure AUTHID CURRENT_USER, then you can run it with privileges granted through roles.  Usually, however, you really want AUTHID DEFINER, and granting the necessary privileges directly to the procedure owner (or to PUBLIC)  isn't too hard.

  • Entity Framework - Execute Stored Procedures With Table Valued Patameter

    How to pass a table valued parameter to a stored procedure in Entity Framework using ExecuteSqlCommand or SqlQuery method?
    Following is my code - 
    DataTable dataTable=new DataTable();
    dataTable.Columns.Add("col1", typeof(int));
    dataTable.Columns.Add("col2", typeof(bool));
    dbContext.Database.ExecuteSqlCommand("exec stored_proc @tvp",
                            new SqlParameter() { SqlDbType = SqlDbType.Structured, ParameterName = "@tvp", Value = dataTable }
    This throws an exception saying 'The table type parameter '@tvp' must have a valid type name.'

    You must set the TypeName property of the SqlParameter to the name of your table type that you have defined in the database:
    SqlParameter param = new SqlParameter();
    param.SqlDbType = SqlDbType.Structured;
    param.ParameterName = "@tvp";
    param.TypeName = "dbo.YourTableType";
    param.Value = dataTable;
    dbContext.Database.ExecuteSqlCommand("exec stored_proc @tvp", param);
    Of course you must define the table type in the database first:
    CREATE TYPE dbo.YourTableType AS TABLE
    ( col1 int, col1 bit )
    Please remember to the following page on MSDN for more information:
    https://msdn.microsoft.com/en-us/library/bb675163(v=vs.110).aspx
    Hope that helps.
    Please also remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Retriving data through stored procedure returning Table of object type

    I am trying to retrieve the data returned as a table(secret_tab_type) of object type(secret_type). Now we can get the secret_tab_type table through
    rset = (ResultSet) cstmt.getObject(1); but how to map the SQL object type to Java object type ??
    FUNCTION Fetchthat(
    secretinfo      out      SECRET_TAB_TYPE,
    message     OUT varchar2
    ) return number;
    These are the declaration of secret_type object and secret_tab_type(table returned by fetchthat procedure)
    create or replace type secret_type as object
    (secret_id number(3),
    secret_question varchar2(100),
    valid_flag char);
    create or replace type secret_tab_type as table of secret_type;

    Amit,
    Your question has been previously asked (and answered) on this forum. I suggest searching this forum's archives for the terms STRUCT and ARRAY.
    For your benefit, here are the results of my search:
    http://tinyurl.com/auvl8
    Good Luck,
    Avi.

  • Using stored procedure with Oracle user-defined types in database control

    Hi,
    I have a requirement where I need to call an Oracle Stored Proc which has IN and OUT parameters. OUT parameters are of user-defined types in Oracle packages.
    I am getting error while calling the Stored proc like below:
    Procedure:
    ==========
    create or replace
    PROCEDURE AA_SAM_TEST (
    col1 out types_aa.aa_tex_type ,
    col2 out types_aa.aa_tex_type ,
    col2 out types_aa.aa_num_type ) As
    Types:
    ======
    create or replace
    package types_aa as
    type aa_tex_type is table of varchar2(255) index by binary_integer;
    type aa_num_type is table of char index by binary_integer;
    end
    Wli Code:
    =========
    DB Control:
    ===========
    * @jc:sql statement="call AA_SAM_TEST(?,?,?)"
    void Call_AA_SAM_TEST(SQLParameter[] param) throws SQLException;
    JPD Code:
    =========
    param = new SQLParameter[3];
    Object param1 = new String();
    Object param2 = new String();
    Object param3 = new String();
    this.param[0] = new SQLParameter(param1 , Types.STRUCT, SQLParameter.OUT);
    this.param[1] = new SQLParameter(param2, Types.STRUCT, SQLParameter.OUT);
    this.param[2] = new SQLParameter(param3, Types.STRUCT, SQLParameter.OUT);
    database_Update.Call_AA_SAM_TEST(this.param);
    I am getting the following error...
    <Jul 24, 2007 6:47:42 PM IST> <Warning> <WLW> <000000> <Id=database_Update; Method=Ctrl_files.Database_Update.Call_AA_SAM_TEST(); Failure=java.sql.SQLException: ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-306: wrong number or typ
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'AA_SAM_TEST'
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'AA_SAM_TEST'
    Can anyone know how to specify OUT parameter of USer-Defined types while using a DB control to access a Stored Proc in Oracle.
    Any help is highly appreciated.
    Thanks

    Hi,
    I have similar problem. Have you already solved the issue?
    Thanks

  • Pl/sql Procedure is Not Creating With the CLOB data Type

    Hi,
    I am Using Oracle 10g Express Edition Release2.... My Doubt is While creating a table With CLOB Data Type the table is created successfully,but while Creating a Procedure With the CLOB Data type i am getting an Error Message
    2667/5 PL/SQL: Statement ignored
    2667/24 PLS-00382: expression is of wrong type
    then i tried With the Varchar2(30000) the Procedure is Created Successfully note i have not changed any thing in my code except the data type.
    I am Just Confused ......Why the Procedure is not Created with CLOB Data type?
    Please advice ...
    Thank U
    SHAN

    hi,
    Thanks for reply....Another Example
    CREATE TABLE USER_MAS (USER_ID     VARCHAR2 (20 Byte),MAIL_ID     VARCHAR2 (255 Byte));
    set serveroutput on
    declare
    atable varchar2(64) := 'USER_MAS';
    acolumn varchar2(64) := 'MAIL_ID';
    avalue varchar2(64) := 'NEWYORK' ;
    dyn_sql clob;
    begin
    dyn_sql := 'update '||atable||' set '||acolumn||' = '''||avalue|| '''' ;
    dbms_output.put_line(dyn_sql);
    execute immediate dyn_sql;
    end;
    commit ;
    Error at line 2
    ORA-06550: line 9, column 23:
    PLS-00382: expression is of wrong type
    ORA-06550: line 9, column 5:
    PL/SQL: Statement ignored
    When i Changed the Data type to varchar2(64)
    update USER_MAS set MAIL_ID = 'NEWYORK'
    PL/SQL procedure successfully completed.
    Commit complete.
    I like to Know the Reason Why the Procedure is Not Created in Oracle 10g XE DB
    Note :the Same Script i used in 11g DB the Procedure is Created Successfully....
    Why you need use CLOB or VARCHAR2 in your temp_num variable as you sending parameters as number?
    In the Procedure we are create some run time queries while executing the procedure. There are around 10 run time queries created.
    The size of each query is more than 4000 characters . We then add all the queries using union all after each query  to the clob variable as the normal varchar will not support.
    Please Advice
    Thank U
    SHAN

  • Stored Procedures with Date data types and Oracle

    This should be easy.... But i keep getting the error:
    [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1,
    column 7: PLS-00306: wrong number or types of arguments in call to
    'RETRIEVE_TS' ORA-06550: line 1, column 7: PL/SQL: Statement
    ignored
    And I got it worked out to where i know it is a problem with
    the way i am using the date data types in a stored procedure....
    In the past i usually avoided calling procedures in Oracle
    with date as the in type.... It is always easiest to let oracle
    convert the string to a date.... Unfortunately now i am stuck with
    having a date type in the procedure call.... So the question is:
    WHAT IS THE PROPER WAY TO SUBMIT DATE/TIME STAMP IN A STORED
    PROCEDURE?
    The Oracle Procedure looks like this:
    PROCEDURE retrieve_ts (
    p_at_tsv_rc IN OUT sys_refcursor,
    p_units IN OUT VARCHAR2,
    p_officeid IN VARCHAR2,
    p_timeseries_desc IN VARCHAR2,
    p_start_time IN DATE,
    p_end_time IN DATE,
    p_timezone IN VARCHAR2 DEFAULT 'GMT',
    p_trim IN NUMBER DEFAULT false_num,
    p_inclusive IN NUMBER DEFAULT NULL,
    p_versiondate IN DATE DEFAULT NULL,
    p_max_version IN NUMBER DEFAULT true_num
    AND the stored procedure call looks like this:
    <cfset ed = Now()>
    <cfset sd = #DateAdd("d",-lbt,Now())#>
    <cfstoredproc datasource="CWMS"
    procedure="cwms.cwms_ts.retrieve_ts"
    returncode="no">
    <cfprocparam type="inout" variable="unit" value="#unit#"
    dbvarname="@p_units"
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="in" value="MVS"
    dbvarname="@p_officeid"
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="in" value=#id.cwms_ts_id#
    dbvarname="@p_timeseries_desc"
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="in" value="#sd#"
    dbvarname="@p_start_time"
    cfsqltype="cf_sql_date">
    <cfprocparam type="in" value="#ed#"
    dbvarname="@p_end_time"
    cfsqltype="cf_sql_date">
    <cfprocparam type="in" value="#tz#"
    dbvarname="@p_time_zone"
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="in" value="0"
    dbvarname="@p_trim"
    cfsqltype="cf_sql_numeric">
    <cfprocparam type="in" value=""
    null = "yes"
    dbvarname="@p_inclusive"
    cfsqltype="cf_sql_numeric">
    <cfprocparam type="in" value=""
    null="yes"
    dbvarname="@p_versiondate"
    cfsqltype="cf_sql_date">
    <cfprocparam type="in" value="1"
    dbvarname="@p_max_version"
    cfsqltype="cf_sql_numeric">
    <cfprocresult name="ts_dat">
    </cfstoredproc>
    Text

    Yeah.... One is a type INOUT ref cursor.... which is denoted
    by the cfprocresult....
    By the way:
    Phil - the code example with a little tweaking worked fine on
    my machine....
    <<cfstoredproc procedure="test_pkg.test"
    datasource="myDSN" returncode="no">
    <cfprocparam type="IN" cfsqltype="cf_sql_timestamp"
    value="15-JUN-2005">
    <cfprocparam type="OUT" cfsqltype="cf_sql_varchar"
    variable="v_out">
    <cfprocresult name="rs1">
    </cfstoredproc>
    PROCEDURE test(
    v3_out OUT ref_cur_type,
    v1_in IN date default null,
    v2_out OUT varchar2
    IS
    BEGIN
    v2_out := TO_CHAR(v1_in, 'mm/dd/yyyy');
    OPEN v3_out
    FOR
    SELECT *
    FROM user
    WHERE activation_date >= v1_in;
    END test;
    Why do i still get this error......
    Here is what it looks like now:
    PROCEDURE retrieve_ts (
    p_at_tsv_rc IN OUT sys_refcursor,
    p_units IN OUT VARCHAR2,
    p_officeid IN VARCHAR2,
    p_timeseries_desc IN VARCHAR2,
    p_start_time IN DATE,
    p_end_time IN DATE,
    p_timezone IN VARCHAR2 DEFAULT 'GMT',
    p_trim IN NUMBER DEFAULT false_num,
    p_inclusive IN NUMBER DEFAULT NULL,
    p_versiondate IN DATE DEFAULT NULL,
    p_max_version IN NUMBER DEFAULT true_num
    <cfstoredproc datasource="CWMS"
    procedure="cwms.cwms_ts.retrieve_ts"
    returncode="no">
    <cfprocparam type="INOUT" variable="p_units"
    value="#unit#" <!---p_units--->
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="IN" value="MVS"
    <!---p_officeid--->
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="IN" value=#id.cwms_ts_id#
    <!---p_timeseries_desc--->
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="IN" value="#sd#"
    <!---p_start_time--->
    cfsqltype="cf_sql_timestamp">
    <cfprocparam type="IN" value="#ed#"
    <!---p_end_time--->
    cfsqltype="cf_sql_timestamp">
    <cfprocparam type="IN" value="#tz#"
    <!---p_timezone--->
    cfsqltype="cf_sql_varchar">
    <cfprocparam type="IN" value="0" <!---p_trim--->
    cfsqltype="cf_sql_integer">
    <cfprocparam type="IN" value=""
    <!---p_inclusive--->
    null = "yes"
    cfsqltype="cf_sql_numeric">
    <cfprocparam type="IN" value=""
    <!---p_versiondate--->
    null="yes"
    cfsqltype="cf_sql_timestamp">
    <cfprocparam type="IN" value="1"
    <!---p_max_version--->
    cfsqltype="cf_sql_integer">
    <cfprocresult name="ts_dat">
    <!---sys_refcursor--->
    </cfstoredproc>
    If I truly am short a parameter, How do you specify the INOUT
    sys_refcursor?

  • How to call a stored procedure that has Table Of data types in VB6?

    Hi everyone,
    I need to call a stored procedure that has a Table Of data type as an input parameter (possibly even several Table Of input parameters). I can't seem to find any example of how to do this in VB6 using ODBC. Is this even possible?
    Thanks you!
    Steve

    Thanks,
    but I need to test stored procedures that uses type defined in the package.
    e.g.
    if I have s.p.
    PROCEDURE get_risultati_squadra
    ( in_squadra IN VARCHAR2,
    out_serie OUT tab_varchar2_5,
    out_tiporisultato OUT tab_varchar2_5,
    out_n_giornata OUT tab_varchar2_5,
    out_squadre OUT tab_varchar2_200,
    out_risultato OUT tab_varchar2_10,
    out_marcatore OUT tab_varchar2_50,
    out_punti OUT tab_varchar2_3,
    out_rimbalzista OUT tab_varchar2_50,
    out_rimbalzi OUT tab_varchar2_3,
    out_esito OUT tab_varchar2_2);
    I have to define every type external to the package, in this case five new TYPE !!
    Is there another way to solve this problem?
    Thanks

  • Problem calling stored procedure with user-defined type of input parameters

    Hi,
    I have to call a stored procedure with IN parameters, but these are user-defined types of input parameters.
    function fv_createnews (
    pit_groups in T_APPLICATION_USER_GROUPS,
    pit_documents in T_DOCUMENTS
    return varchar2;
    TYPE T_APPLICATION_USER_GROUPS IS
    TABLE OF varchar2(500)
    INDEX BY binary_integer;
    TYPE T_DOCUMENT IS record (
    name varchar2(256)
    ,url varchar2(1024)
    ,lang varchar2(30)
    ,foldername varchar2(150)
    TYPE T_DOCUMENTS IS
    TABLE OF T_DOCUMENT
    INDEX BY binary_integer;
    How can I do this using the TopLink 10.1.3 API.
    I already found following related posts, but I still can' t make it up:
    Using VARRAYs as parameters to a Stored Procedure
    Pass Object as In/Out Parameter in Stored Procedure
    Or do I have to create my own PreparedStatement for this special stored procedure call using Java and Toplink?

    As the related posts suggest, you will need to use direct JDBC code for this.
    Also I'm not sure JDBC supports the RECORD type, so you may need to wrap your stored functions with ones that either flatten the record out, or take OBJECT types.

  • Please help - Can not use stored procedure with CTE and temp table in OLEDB source

    Hi,
       I am going to create a simple package. It has OLEDB source , a Derived transformation and a OLEDB Target database.
    Now, for the OLEDB Source, I have a stored procedure with CTE and there are many temp tables inside it. When I give like EXEC <Procedure name> then I am getting the error like ''The metadata  could not be determined because statement with CTE.......uses
    temp table. 
    Please help me how to resolve this ?

    you write to the temp tables that get created at the time the procedure runs I guess
    Instead do it a staged approach, run Execute SQL to populate them, then pull the data using the source.
    You must set retainsameconnection to TRUE to be able to use the temp tables
    Arthur My Blog

  • T-sql 2008 r2 place results from calling a stored procedure with parameters into a temp table

    I would like to know if the following sql can be used to obtain specific columns from calling a stored procedure with parameters:
    /* Create TempTable */
    CREATE TABLE #tempTable
    (MyDate SMALLDATETIME,
    IntValue INT)
    GO
    /* Run SP and Insert Value in TempTable */
    INSERT INTO #tempTable
    (MyDate,
    IntValue)
    EXEC TestSP @parm1, @parm2
    If the above does not work or there is a better way to accomplish this goal, please let me know how to change the sql?

    declare @result varchar(100), @dSQL nvarchar(MAX)
    set @dSQL = 'exec @res = TestSP '''+@parm1+''','' '''+@parm2+' '' '
    print @dSQL
      EXECUTE sp_executesql @dSQL, N'@res varchar(100) OUTPUT', @res = @result OUTPUT
    select @result
    A complicated way of saying
    EXEC @ret = TestSP @parm1, @parm2
    SELECT @ret
    And not only compliacated, it introduces a window for SQL injection.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • JDBC-Adapter-Receiver Calling Stored Procedure with Input-Typ Record

    Hallo,
    I´ m trying calling a stored-procedure with two input-parameter; one of typ record (oracle) and one of type tabel of records. Is this possible (I think there are only types like string, integer etc. possible)? When not is there another possibility to work with that type?
    Thanks in advance,
    Frank

    Hi Frank,
    I think stored procedures will not take Array of Records as a Input. If you want to make a loop funtionality etc then JDBC adapter will work accordingly. You need to just call the stored procedure from the JDBC adapter. It will work for the array of records(multiple occurences).
    Receiver JDBC Procedures.
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Alternative option is you can make use of Java Proxy and from there you can call stored procedure ..I think it is possible.. not tried.
    Hope this helps
    Regards,
    Moorthy

Maybe you are looking for