Link to form with stored procedure

Hi all,
We want to have a report with a link that goes to a form that updates using a stored procedure.
The update form has to get the recent data (not the data from the report).
To do this we want to pass the id parameter and with that get the rest of the fields from the table.
Does somebody know how to do this?
TIA,
Igor & Eric

Create a report.
Create a form based on procedure.
Create a link based on the above form.
Attach this like to the report Id column.
Now edit this link and supply the value for ID (Select the column) for the corresponding form field.
Thanx,
chetan.

Similar Messages

  • Problem With Stored Procedure

    Post Author: Ranjith.403
    CA Forum: General
    Hi,
    Am new to crystal reports with stored procedures
    am created a report using a stored procedure in oracle. In that Stored Procedure am Using a temporary table.
    After inserting values into the table am assigning to ref cursor.
    Refcursor having fields like item,onhandstock,purchase rate
    This report working fine in oracle version 9.2.0.1.0 where comes to oracle version 9.2.0.8.0 it's giving the varchar values correctly.
    The Number values are showing as 0.
    Help me to solve it.
    Thanks in Advance,
    Ranjith

    Try modularising this large procedure into smaller procedures and functions, and determine which part is causing you trouble.

  • How to link a form with MSC2N

    Hi,
    Somebody know how to link a form with MSC2N.
    I want to complete the characteristic in the classification and after I want to print them with MSC2N;
    Thanks a lot for your help.
    Best regards
    Kari

    I explain you my problem.
    I want to link a form with MSC2N in order to print all the characteristic, and  all the informations of the good issue.
    That's why I want to link a form with MSC2N.
    My customer ask me to ceate a form with these informations and I don't kow how to join the characteristics in MSC2N and the datas which come from MIGO.
    Somebody could help me?
    Thanks a lot
    Kari

  • Link a form with MSC2N

    Hi,
    Somebody know how to link a form with MSC2N.
    I want to complete the characteristic in the classification and after I want to print them with MSC2N;
    Thanks a lot for your help.
    Best regards
    Kari

    I explain you my problem.
    I want to link a form with MSC2N in order to print all the characteristic, and  all the informations of the good issue.
    That's why I want to link a form with MSC2N.
    My customer ask me to ceate a form with these informations and I don't kow how to join the characteristics in MSC2N and the datas which come from MIGO.
    Somebody could help me?
    Thanks a lot
    Kari

  • Passing parameters from vb form to a crystal report with stored procedure

    Can someone give me an idea how to use data inputted on vb form to be use as basis of crystal report generation which loads data from a stored procedure. Stored procedure has parameters that was also set in the crystal report. viewing on crystal report is ok but i am having difficulty running the report from vb.

    Hi John,
                  If Not CRRpt.ParameterFields("AgeType") Is Nothing Then
                        CRRpt.ParameterFields("AgeType").CurrentValues.Clear()
                        Dim ParamValue As new CrystalDecisions.Shared.ParameterDiscreteValue
                        ParamValue.Value = AgeType.ToString 
                        CRRpt.ParameterFields("AgeType").CurrentValues.Add(ParamValue)
                    End If
    Note that the ParamValue.Value should be assigned with exact same data type as you declared it in CR.
    If it is string, Convert your Variable to string first.
    If it is date, make sure you are passing a date variable.
    and so on...
    Regards
    Edy

  • Web form not updating database with stored procedure

    Hello
    i have a problem with the web form updating the database i have a stored procedure which i need to connect to. If i execute the procedure in the SQL it will update the database but when i run the web form i get my catch error "could not update database".
    I have read so much on the net and my code seem ok but i,m just so lost.
    stored procedure
    PROCEDURE [dbo].[UpdateCustomer]
    @ID INT,
    @Firstname VARCHAR(30),
    @Surname VARCHAR(30),
    @Age INT
    AS
    BEGIN
    UPDATE Customer
    SET Firstname = @Firstname,
    Surname = @Surname,
    Age = @Age
    WHERE CustID = @ID
    END
    update code
    try
    SqlCommand command = new SqlCommand();
    command.Connection = conn;
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "UpdateCustomer";
    command.Connection.Open();
    SqlParameter param = new SqlParameter();
    param.ParameterName = "@ID";
    param.SqlDbType = SqlDbType.Int;
    param.Direction = ParameterDirection.Input;
    param.Value = txtCustID.Text;
    command.Parameters.Add(param);
    command.Parameters.AddWithValue("@CustID", txtCustID.Text.ToString());
    command.Parameters.AddWithValue("@Firstname", txtFirstname.Text);
    command.Parameters.AddWithValue("@Surname", txtSurname.Text);
    command.Parameters.AddWithValue("@Gender", Gender.Text.ToString());
    command.Parameters.AddWithValue("@Age" ,txtAge.Text.ToString());
    command.Parameters.AddWithValue("@Address1", txtAddress1.Text.ToString());
    command.Parameters.AddWithValue("@Address2", txtAddress2.Text.ToString());
    command.Parameters.AddWithValue("@City", txtCity.Text.ToString());
    command.Parameters.AddWithValue("@Phone", txtPhone.Text.ToString());
    command.Parameters.AddWithValue("@Mobile", txtMobile.Text.ToString());
    command.Parameters.AddWithValue("@Email", txtEmail.Text.ToString());
    command.ExecuteNonQuery();
    lblMessage.Text = "Your Record(s) Have been Updated";
    command.Connection.Close();
    catch
    lblMessage.Text = "Your Record was not updated please try again";
    Thank you for your help

    To expand on Mike's advice.
    Change your catch to:
    catch(Exception ex)
    { // Break point here
    lblMessage.Text = "Your Record was not updated please try again";
    Put a break point in where the comment says.
    Run it.
    Hover over ex or add a quickwatch ( right click it ) and see what the error and inner exception is.
    I see several problems though.
    You have way too many parameters and Age should be int.
    They are objects  - they have a type.
    It'll be a string with your code there.
    Something more like
    command.Parameters.Add("@Age", SqlDbType.Int);
    command.Parameters["@Age"].Value = Convert.ToInt32(txtAge.Text);
    Although that might not cut and paste, it's air code intended to give you the idea.
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Receive java.lang.NullPointerException (JCA-12563) on SCA with Stored Procedure dbAdapter (SOA Suite 12.1.3)

    Hi,
    I'm new to the Oracle SOA Suite and have been creating very simple SCA WebServices (async and sync) prototypes to INSERT, UPDATE and Poll Oracle 9i and 11g databases. So far, everything works and passes the tests from EM.
    I cannot get the Stored Procedure WebService to test successfully as I receive the error message below regardless of JNDI configuration for XA, non-XA, Last Logging Resource, Support Global Transactions,PlatformClassName, etc...  The Outbound Connection Pool is setup correctly as the other DML tests have worked fine.
    BINDING.JCA-12563
    Exception occurred when binding was invoked.
    Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'dbReference' failed due to: Interaction processing error.
    Error while processing the execution of the IFSAPP.TEST_SOA_API API interaction.
    An error occurred while processing the interaction for invoking the IFSAPP.TEST_SOA_API API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.  This exception is considered not retriable, likely due to a modelling mistake.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Caused by: BINDING.JCA-12563
    Exception occurred when binding was invoked.
    Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'callAPI' failed due to: Interaction processing error.
    Error while processing the execution of the IFSAPP.TEST_SOA_API API interaction.
    An error occurred while processing the interaction for invoking the IFSAPP.TEST_SOA_API API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.  This exception is considered not retriable, likely due to a modelling mistake.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
       at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:569)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:724)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:689)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:628)
        at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:325)
        ... 84 more
    Caused by: BINDING.JCA-11812
    Interaction processing error.
    Error while processing the execution of the IFSAPP.TEST_SOA_API API interaction.
    An error occurred while processing the interaction for invoking the IFSAPP.TEST_SOA_API API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.  This exception is considered not retriable, likely due to a modelling mistake.
        at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:690)
        at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:656)
        at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:180)
        at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:183)
        at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1302)
        at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:307)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:415)
    Caused by: java.lang.NullPointerException
        at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:162)
        ... 91 more
    The SP SCA is the simplest possible application I can think of...  The WebService accepts a single INT, calls BPEL>Receive>Assign>Invoke>dbAdapter(Stored Procedure) that accepts a single IN INTEGER parameter in an Oracle 11g database.
    Steps I've used to create the SP SCA. (Create Empty SOA Application)
    1.) Create Database Adapter in External References swim lane.
    2.) Set JNDI and Connection.
    3.) Browse to Oracle Procedure...click through Wizard and accept all defaults.
       CREATE OR REPLACE PROCEDURE TEST_SOA_API (
         wo_order_no_ IN INTEGER)
       IS
       BEGIN
         INSERT INTO TEST_TMP VALUES (wo_order_no_);
       END;
    4.) WSDL, XSD, JCA are automatically generated. 
    5.) Create BPEL Process Component and select Template "Base on a WSDL".  I choose the WSDL created from the Database Adapter wizard.
    6.) The "Exposed Service" is automatically created and everything is wired.
    7.) I deploy to my CompactDomain (running on a local Oracle12 db).  No errors.
    8.) I login to EM and Test the WebService..and ALWAYS receive the error message above.
    I've tried BPEL Process and Mediator as components to simply pass the single incoming INT parameter to the SP DbAdapter and tried every combination I can think of with DataSource/DbAdapter Deployment through the Admin console.  I used the same exact steps above for INSERT, UPDATE, Polling and have had no issues so I cannot figure out why I'm not receiving java.NullPointer exception or why I'm receiving the XML/XSD malformation error.
    Stuck now...anyone have an idea what I'm doing wrong or simply tell me I'm an idiot and shouldn't do SP's this way?
    FYI.  I've turned on logging for the oracle.soa.adapter.db class to TRACE: 32(FINEST).  Not much help to me
    [2015-04-02T09:03:55.706-05:00] [AdminServer] [WARNING] [ADF_FACES-00007] [oracle.adf.view.rich.render.RichRenderer] [tid: 118] [userId: weblogic] [ecid: 852497f1-b648-4cac-9cee-05e7972ce68e-00000788,0] [APP: em] [DSID: 0000KluHqzk0NuGayxyWMG1L7K52000003] Attempt to synchronized unknown key: viewportSize.
    [2015-04-02T09:05:23.971-05:00] [AdminServer] [TRACE] [] [oracle.soa.adapter.db.outbound] [tid: 115] [userId: <anonymous>] [ecid: 852497f1-b648-4cac-9cee-05e7972ce68e-000007db,1:17474] [APP: soa-infra] [oracle.soa.tracking.FlowId: 250004] [oracle.soa.tracking.InstanceId: 1270014] [oracle.soa.tracking.SCAEntityId: 90004] [composite_name: OraclePLSQL2!1.0] [FlowId: 0000KluSpyP0NuGayxyWMG1L7K52000007] [SRC_CLASS: oracle.tip.adapter.db.sp.AbstractStoredProcedure] [SRC_METHOD: execute]  [composite_version: 1.0] [reference_name: dbReference] BEGIN IFSAPP.TEST_SOA_API(WO_ORDER_NO_=>?); END;
    [2015-04-02T09:05:23.972-05:00] [AdminServer] [TRACE] [] [oracle.soa.adapter.db.outbound] [tid: 115] [userId: <anonymous>] [ecid: 852497f1-b648-4cac-9cee-05e7972ce68e-000007db,1:17474] [APP: soa-infra] [oracle.soa.tracking.FlowId: 250004] [oracle.soa.tracking.InstanceId: 1270014] [oracle.soa.tracking.SCAEntityId: 90004] [composite_name: OraclePLSQL2!1.0] [FlowId: 0000KluSpyP0NuGayxyWMG1L7K52000007] [SRC_CLASS: oracle.tip.adapter.db.sp.AbstractStoredProcedure] [SRC_METHOD: execute]  [composite_version: 1.0] [reference_name: dbReference] Bindings [WO_ORDER_NO_=>INTEGER(2343)]
    WSDL
    <wsdl:definitions
         name="dbReference"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/OraclePLSQL2/OraclePLSQL2/dbReference"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/OraclePLSQL2/OraclePLSQL2/dbReference"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
         xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        >
      <plt:partnerLinkType name="dbReference_plt" >
        <plt:role name="dbReference_role" >
          <plt:portType name="tns:dbReference_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
         <schema xmlns="http://www.w3.org/2001/XMLSchema">
           <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference"
                   schemaLocation="../Schemas/dbReference_sp.xsd" />
         </schema>
        </wsdl:types>
        <wsdl:message name="args_in_msg">
            <wsdl:part name="InputParameters" element="db:InputParameters"/>
        </wsdl:message>
        <wsdl:portType name="dbReference_ptt">
            <wsdl:operation name="dbReference">
                <wsdl:input message="tns:args_in_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>
    XSD
    <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference" elementFormDefault="qualified">
       <element name="InputParameters">
          <complexType>
             <sequence>
                <element name="WO_ORDER_NO_" type="int" db:index="1" db:type="INTEGER" minOccurs="0" nillable="true"/>
             </sequence>
          </complexType>
       </element>
    </schema>
    Payload XML
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
            <soap:Body>
                    <ns1:InputParameters xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference">
                            <ns1:WO_ORDER_NO_>667</ns1:WO_ORDER_NO_>
            </ns1:InputParameters>
        </soap:Body>
    </soap:Envelope>

    An even simpler request:
    Can someone create an SCA that simply accepts a single INT parameter and calls a Stored Procedure (Oracle) that inserts this INT into a table?  Maybe upload the project folder structure in a zip? 
    Seems someone with experience on this platform could execute this task in 10-15 minutes.
    CREATE TABLE TEST_TMP (WO_ORDER_NO INT);
       CREATE OR REPLACE PROCEDURE TEST_SOA_API (
         wo_order_no_ IN INTEGER)
       IS
       BEGIN
         INSERT INTO TEST_TMP VALUES (wo_order_no_);
       END;

  • Insert Multiple records using Database adapter with Stored procedure func

    Hi All,
    I want to insert multiple records on a database using a stored procedure. I wanted to insert those records using a Database Adapter and the Database adapter should be invoked by a Mediator.
    Can somebody suggest me with ideas whether it can be acheived with OOB capabtilities in SOA suite or not?
    Thanks for your help in advance.
    Thanks,
    Shiv

    The use case you want to achieve is feature supported by the DBAdapter and it is possible to invoke the same from mediator.
    Please have a look at the oracle documentation and you should be able to get the necessary information.
    The below links should help you as well:
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    http://blogs.oracle.com/ajaysharma/2011/03/using_file_adapter_database_adapter_and_mediator_component_in_soa_11g.html
    There are some video tutorials as well :)
    http://www.youtube.com/watch?v=dFldS-fDx70 This should also help
    Thanks,
    Patrick

  • How to use optional prompts with stored procedure universe?

    Hi Experts,
    Iu2019m working on stored procedure universe in BO XI 3.0 SP2 FP2.5 with oracle at back end. My requirement is that I have to pass 5 optional prompts in the report and we have to pass these prompts through open document link. Please tell if this can be worked out on stored procedure universe?
    Thanks in advance.

    Hi,
    Try with OpenDoc syntax as follows.
    http://<servername>:<port>/OpenDocument/opendoc/<plat
    formSpecific>?iDocID=****&sIDType=CUID&sType=wid/rpt&lsM/lsS/lsRPROMPTNAME=[V1],[V2]&sDocName=reportname&sRefresh=Y/N
    where
    server name: cms server name
    port: portno
    <platformspecific>=: for java -> openDocument.jsp
                                      for .net -> opendocument.aspx
    idocid,sDocName & cuid -> we can get report properties ( goto info view -> select report -> right click -> properties i.e. doc id, cuid and report name)
    sType -> type of report i.e webi or deski ...
    lsS -> to pass single prompt value
    lsM -> to pass multiplle values to prompt
    lsR -> range of values ....
    Note: Here prompt name should be same as the one which we used in the report. Use + if there is blank space.
    Cheers,
    Suresh Aluri.

  • Sender JDBC with Stored Procedure or Function

    Hi.
    I have a problem to update a row that I obtain from sender JDBC (using SELECT or calling to a FUNCTION).
    As the consultation is so complex and the table has fed up transactions, often it takes the registry “A” and updates register “B”.
    Try to use the level of transaction “Serializable” (/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter) but it throws the following error to me:
    "The JDBC driver returned the following error message: 'java.sql.SQLException: ORA-08177: can't serialize access for this transaction '. For details, contact your database server vendor."
    Try to invoke to a function (/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter) but when placing a sentence of UPDATE within the function throws an error, I reviewed to me and calling to a function from a SELECT, Oracle it does not allow to modify registries of the database.
    Some other suggestion?

    Hi,
    See this link,
    Here is an example of mapping for synch JDBC.
    /people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Also go thru these links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.

  • Probleme with stored procedure in oracle 10 g

    I create a stored procedure for archiving successfully compile but when I select t_sql_statement i have 0 rows :( :(
    create or replace
    PROCEDURE p_archive_test(piv_owner varchar2)
    is
    lv_stmt varchar2(2000) := 'insert /*+ append */ into TABLE1 (COLUMNS)
                                                                     select INS_COLUMNS
                                                                     from TABLE2 tab2@db1
                                                                     where not exists (select null
                                                                                         from TABLE1 tab1
                                                                                         where PKCOLUMNS
    cursor c_tab is
    select tab.table_name,'ERR$_'||tab.table_name ERR_TABLE
    from all_tables tab
              where tab.owner = piv_owner
    -- and tab.table_name = 'action'
    --order by atb.TABLE_ORDER
    -- For each table get the primary key columns     
    cursor c_pk(civ_table_name in all_tables.TABLE_NAME%type)
    is
    select acl.COLUMN_NAME
    from all_cons_columns acl
    ,all_constraints acn
    where acn.OWNER = piv_owner
    and acn.CONSTRAINT_TYPE = 'P'
    and acn.TABLE_NAME = civ_table_name
    and acl.OWNER = acn.OWNER
    and acl.TABLE_NAME = acn.table_name
    and acl.CONSTRAINT_NAME = acn.CONSTRAINT_NAME
    order by acl.POSITION;
    -- For each table get the corresponding table columns names
    cursor c_ins_cols(civ_table_name in all_tab_columns.TABLE_NAME%type)
    is
    select 'tab2.'||atc.COLUMN_NAME column_name
    from all_tab_columns atc
    where atc.OWNER = piv_owner
    and atc.TABLE_NAME = civ_table_name
    order by atc.COLUMN_ID;
    -- For each table get the columns names excluding the primary key columns
    cursor c_upd_cols(civ_table_name in all_tab_columns.TABLE_NAME%type)
    is
    select 'tab1.'||atc.COLUMN_NAME||'=tab2.'||atc.column_name column_name
    from all_tab_columns atc
    where atc.OWNER = piv_owner
    and atc.TABLE_NAME = civ_table_name
    and not exists (select 1
    from all_cons_columns acl
    ,all_constraints acn
    where acl.OWNER = atc.owner
    and acl.TABLE_NAME = atc.TABLE_NAME
    and acl.column_name = atc.column_name
    and acn.OWNER = acl.OWNER
    and acn.TABLE_NAME = acl.TABLE_NAME
    and acn.constraint_type = 'P')
    order by atc.COLUMN_ID;
    -- For each table get the columns names
    cursor c_cols(civ_table_name in all_tab_columns.COLUMN_NAME%type)
    is
    select
    --'tab1.'||
    atc.COLUMN_NAME column_name
    from all_tab_columns atc
    where atc.owner = piv_owner
    and atc.TABLE_NAME = civ_table_name
    order by atc.COLUMN_ID;
    lv_cols varchar2(4000);
    lv_pk_cols varchar2(4000);
    lv_ins_cols varchar2(4000);
    lv_upd_cols varchar2(4000);
    BEGIN
    for r_tab in c_tab
    loop
    lv_cols := '';
    lv_pk_cols := '';
    lv_ins_cols := '';
    lv_upd_cols := '';
    for r_pk in c_pk(civ_table_name => r_tab.table_name)
         loop
    lv_pk_cols := lv_pk_cols||'tab1.'||r_pk.column_name||'=tab2.'||r_pk.column_name||' and ';
    end loop r_pk_loop;
    lv_pk_cols := substr(str1 => lv_pk_cols
    ,pos => 1
    ,len => length(ch => lv_pk_cols) - 5);
    for r_ins_cols in c_ins_cols(civ_table_name => r_tab.table_name)
    loop
    lv_ins_cols := lv_ins_cols||r_ins_cols.column_name||',';
    end loop r_ins_cols_loop;
    lv_ins_cols := substr(str1 => lv_ins_cols
    ,pos => 1
    ,len => length(ch => lv_ins_cols) - 1);
    for r_upd_cols in c_upd_cols(civ_table_name => r_tab.table_name)
         loop
    lv_upd_cols := lv_upd_cols||r_upd_cols.column_name||',';
    end loop r_upd_cols_loop;
    lv_upd_cols := substr(str1 => lv_upd_cols
    ,pos => 1
    ,len => length(ch => lv_upd_cols) - 1);
    for r_cols in c_cols(civ_table_name => r_tab.table_name)
         loop
    lv_cols := lv_cols||r_cols.column_name||',';
    end loop r_cols_loop;
    lv_cols := substr(str1 => lv_cols
    ,pos => 1
    ,len => length(ch => lv_cols) - 1);
    lv_stmt := replace(replace(replace(replace(replace(replace(replace(lv_stmt
    ,'TABLE1'
    ,r_tab.table_name)
    ,'TABLE2'
    ,'DIST_'||r_tab.table_name)
    ,'PKCOLUMNS'
    ,lv_pk_cols)
    ,'UPD_COLUMNS'
    ,lv_upd_cols)
    ,'INS_COLUMNS'
    ,lv_ins_cols)
    ,'COLUMNS'
    ,LV_COLS)
    ,'TABLE3'
    ,R_TAB.ERR_TABLE);
    -- here It highy advisable to store the sql statement that will be submitted
    -- to the SQL engine before executing it dynamically
    insert into t_sql_statement values (lv_stmt);
    execute immediate lv_stmt;
    end loop ;
    commit;
    exception
    when others then
    rollback;
    raise;
    end p_archive_test;

    Welcome to the forum!
    Unfortunately you have posted to the wrong forum. This question is not about sql developer and is more appropriate for the sql and pl/sql forum
    PL/SQL
    Please
    1. repost the question in the SQL and PL/SQL forum
    2. edit this question to tell people to followup in the other forum - post the link to the question in the other forum
    3. mark this question answered so people will followup in the other forum.
    Read the FAQ in the other forum (there will be link at the top right of the page) for how to post a question and the information you need to provide. In particular use 'code' tags (see FAQ for explanation) before and after posted code and always provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    Before you post the new thread I suggest you perform some additional testing by
    1. Modify your code so that it creates the statements but does not execute them. With dynamic sql the most common problem is incorrect syntax and until you have verified that the syntax is both correct and exactly what you want it is a waste of time to execute the statements.
    2. Modify your code to only create one statement (add WHERE ROWNUM = 1 to the main query). If the syntax is wrong it will be wrong for all of the statements so until the code works correctly for one loop it is a waste of time perform 10's or 100' of loops.
    3. Currently you are not committing the creation of the statement itself but only after it is executed. Thus if the execution fails the query that failed won't be available for you to examine. Either commit the INSERT or, at a minimum capture the query into a global variable and add a DBMS_OUTPUT to the exception handler to display the failed query so you can examine and test it to fix any problem.
    Also, by just blindly using the data in ALL_TAB_COLS you are not taking into account that Oracle creates hidden (see the hidden column) and virtual columns that will cause your processing to fail for any tables that use them since you cannot use them directly in queries like you are creating.

  • Publishing JSP form JAVA stored procedure [Oracle8i 8.1.7]

    Hi folks,
    I wonder if anybody knows a way to publish JSP from JAVA stored procedure.
    I know there is a way to load java class using PL/SQL package DBMS_JAVA.loadjava(), or
    oracle.aurora.server.tools.loadjava.LoadJavaMain.serverMain() from java.
    But I need somthing like publishjsp to translate the JSP.
    Also would be nice if I can invoke this from a LOB where I have stored my JSP.
    Any ideas?
    Mitko

    I case anyone is interested.
    I managed to find out what I was doing wrong.
    First when you call a stored procedure that is in a package and is a method of a class. You call it referencing the packagename.method. Leaving out the class name. Also, since this was a method that returns a value. The return value has to be assigned to a variable or used in an sql statement. Such as:
    var x number;
    call claimsprocedures.ip(19990033) into :x;call completed
    print x;(then the value is displayed in sql*plus
    scirco.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by scirco:
    I created a simple java stored procedure and depoloyed it using the deployment wizard. The code for the class is as follows:
    // Copyright (c) 2000 CAP-MPT
    package ClaimsProcedures;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.*;
    import java.sql.SQLException;
    * A Sqlj class.
    * <P>
    * @author Sebastian Circo
    public class ClaimsFinancialHistory extends Object {
    * Constructor
    public ClaimsFinancialHistory() {
    public static int IP(int Claimno) throws SQLException {
    int Val;
    Val = 0;
    #sql {select sum(amount) into :Val from reshist
    where claimno = :Claimno and type = 'RI'};
    return Val;
    The wizard indicated that everything deployed properly. However when I try to call the procedure/method "IP" from sql*plus I get the following message: ORA-06576: not a valid function or procedure name. I double checked to make sure that I'm publishing the "IP" method and I still get the same error. I also tried calling the procedure with the schema.class.procedure form, still same error.
    Can anyone help?
    thanks
    scirco<HR></BLOCKQUOTE>
    null

  • Error with stored procedure block datasource

    Hi all,
    I tried to base a datablock on a stored procedure in order to get better runtime performance. I work with Forms Builder 6i with patch 17 , and our database is oracle 8.1.7.1.4
    But when compiling I got errors.
    Here are what I did :
    create or replace type TSourceObject as object(name varchar2(30), propname varchar2(200));
    create or replace type TSourceTable is table of TSourceObject;
    create or replace procedure p_query_ntwk_chnl_mirror(p_tab IN OUT NOCOPY TSourceTable, p_action varchar2, p_lien number)
    is
    begin
    if p_action = 'VISU' then
    select TSourceObject(B.bdw_name, P.prop_bdw_name)
    bulk collect into p_tab
    from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
    where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw
    and EXISTS (SELECT 1
    FROM t_channel_element C
    WHERE N.comp_network_channel = C.comp_network_channel and comp_lien = p_lien);
    else
    select TSourceObject(B.bdw_name, P.prop_bdw_name)
    bulk collect into p_tab
    from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
    where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw;
    end if;
    end;
    Then I created the datablock with the wizard , I entered correctly the value of the arguments for the table type name, the argument p_action and the argument p_lien.
    And when compiling there was this alert error :
    Compiling QUERY-PROCEDURE trigger on NETWORK_CHANNEL_MIRROR data block...
    Compilation error on QUERY-PROCEDURE trigger on NETWORK_CHANNEL_MIRROR data block:
    PL/SQL ERROR 960 at line 5, column 9
    RPCs cannot use variables with schema level user-defined types in this release
    PL/SQL ERROR 0 at line 5, column 9
    Item ignored
    PL/SQL ERROR 320 at line 7, column 26
    the declaration of the type of this expression is incomplete or malformed
    PL/SQL ERROR 0 at line 7, column 1
    Statement ignored
    PL/SQL ERROR 320 at line 8, column 28
    the declaration of the type of this expression is incomplete or malformed
    PL/SQL ERROR 0 at line 8, column 1
    Statement ignored
    Compilation errors have occurred.
    So what should I do ?
    Thank you very much indeed.

    I create the package , and when creating the body then there was an error.
    Here is the package :
    create or replace package pkg_query_ntwrk_chnl_mirror
    is
    type TSourceObject is record(name varchar2(30), propname varchar2(200));
    type TSourceTable is table of TSourceObject index by binary_integer;
    procedure p_query_ntwk_chnl_mirror(p_tab IN OUT NOCOPY pkg_query_ntwrk_chnl_mirror.TSourceTable, p_action varchar2, p_lien number);
    end;
    create or replace package body pkg_query_ntwrk_chnl_mirror
    is
    procedure p_query_ntwk_chnl_mirror(p_tab IN OUT NOCOPY pkg_query_ntwrk_chnl_mirror.TSourceTable, p_action varchar2, p_lien number)
    is
    begin
    if p_action = 'VISU' then
         select B.bdw_name, P.prop_bdw_name
         bulk collect into p_tab
         from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
         where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw
         and EXISTS (SELECT 1
         FROM t_channel_element C
         WHERE N.comp_network_channel = C.comp_network_channel and comp_lien = p_lien);
    else
         select B.bdw_name, P.prop_bdw_name
         bulk collect into p_tab
         from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
         where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw;
    end if;
    end;
    end;
    And here is the error :
    7/2 PL/SQL: SQL Statement ignored
    8/20 PLS-00597: expression 'P_TAB' in the INTO list is of wrong type
    15/2 PL/SQL: SQL Statement ignored
    16/20 PLS-00597: expression 'P_TAB' in the INTO list is of wrong type
    And what is the problem here ? I think it is right!

  • Toplink with stored procedures

    Hi
    I am new to Toplink and would like to get an idea whether Toplink would be suitable for our application. Currently, in our application we always access the database through stored procedures. I realize Toplink supports stored procuedres with StoredProcedureCall class. However; I am just trying to get some feedback as to whether using only this feature(as well as handling database connections etc.) of Toplink is a good idea or not.
    Thanks,
    Izi

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • Report with Stored Procedure does not return until refresh

    I'm using RAS server 2008 to run many Crystal reports from a web application (TrackWise) over Oracle 10g DB.
    A new report is using a stored procedure that takes several minutes (5-10) to return before the rest of the report's SQL can execute.
    When running the report from Crystal Developer there is no problem,
    but when running from the application (using the RAS), the report seems to be running forever,
    However, if you wait a few minutes for the DB utilization to drop (i.e. for the stored procedure to finish) and refresh - the full report appears on the screen in a second.
    Since I have many other reports that run for much longer time with no issue, I assume that this has nothing to do with the web application, but rather related to the connection between the RAS and the DB (i.e. the idle time between the beginning of the stored procedure execution to its return and the continuation of the report creation).
    I assume that I need to change one of the RAS settings/ parameters (in the properties or in the registry), but which?
    Please assist.

    Since this app is from TrackWise, I'd recommend contacting TrackWise and see if they have an answer for you. As it is, we have no idea how they implemented the CR components in their app. If they cannot help you, it should be them coming here and asking us - or better yet they should be creating a phone incident.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

Maybe you are looking for

  • File in Use error deleting PDF in Windows 8.1 SkyDrive

    I'm using SkyDrive and have ran into an interesting issue. I'm also using Adobe Acrobat XI Standard When I save a PDF file to SkyDrive in Windows 8.1, it becomes difficult to delete the file via the file explorer I get a "File In Use" error - "The ac

  • Nokia lumia 710 glass broken

    Hi, unfortunately I dropped my lumia 710 and its glass has cracks now. Where do I get new casing with glass. Who provide services like this in CA, USA

  • How do I get iCloud music off the phone?

    Actually this isn't only for the iPhone, but all of my devices. I use the iCloud service for listening to music. I understand it does not stream and it downloads the song and stores it locally on the device. I have lots of music now stored on devices

  • Order of Objects

    Hello all, We're trying to script objects to do something like "bring to front" and "send to back" to visually order it on top of each others. Is this possible? It seems that there is no direct way of doing it! BR, Yasser

  • Flattening of xml

    Hey, I have an xml document that is an atom feed. As atom feeds go the repeating element is the <entry> I'm trying to access the <contributor><name>text</name></contributor> Is there any "work around" usings Spry's API to access this?