Calling PL/SQL stored procedure from JSP tag

Hello,
I need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
Thank you
Syed

need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
regards
Indira Rani Bandi

Similar Messages

  • Calling pl/sql stored procedure from shell script ( kshell)

    hello.,
    i have written a stored procedure. i need to call this stored procedure from a unix shell script ( korn shell).
    can anyone please help me how can i do it.actually there are 3 stored procedures. so my shell script has to call each stored procedure, execute it then go to next stored procedure execute it.
    if by chance inbetween any stored procedure do not execute then the shell script has to tell me that this stored procedure failed to execute.
    please help me in this.
    thanks
    madan

    Sorry Madan,
    Following is the complete solutiion:
    !# /usr/bin/ksh
    sqlplus -s user/pass@server << EOF > a.log
    exec proc1;
    exec proc2;
    exec proc3;EOF
    if [ $? -eq 0 ]
    then
            echo "\n Procedures completed successfully at `date`"
    else
            echo "!!! FAILED!!!"
            echo "Details can be found in a.log File"
    fi

  • Calling PL/Sql Stored Procedure from java file

    Having problem in calling oracle stored procedure using bc4j.

    in ApplicationModuleImpl you can use following e.g.
    on client side use a custom method to access
    try {
    DBTransaction dBTransaction = getDBTransaction();
    String stmt = "CALL CHANGE_OWNER( ?, ?)";
    CallableStatement callableStatement = dBTransaction.createCallableStatement(stmt,DBTransaction.DEFAULT);
    callableStatement.setString( 1, oldOwner );
    callableStatement.setString( 2, newOwner );
    callableStatement.execute();
    } catch (SQLException ex) {
    throw new JboException(ex);
    }

  • Calling PL/SQL stored procedure from XML template

    I've a requirement to call a store procedure/function/package from XML template. How can i achieve this?

    >
    XML template
    >
    do you mean "data template" with sql statement?
    below using package in sql statement and data structure element for data template
    <?xml version="1.0" encoding="UTF-8" ?>
    <dataTemplate name="XXCUSTOM_PKG" defaultPackage="XXCUSTOM_PKG" version="1.0">
    <sqlStatement name="Q_INVOICES">
    select
    XXCUSTOM_PKG.invoice_type()
    from <some_table>
    </sqlStatement>
    <dataTrigger name="beforeReportTrigger" source="XXCUSTOM_PKG.beforereport"/>
    <dataStructure>
    <element name="in_title"  dataType="varchar2" value="XXCUSTOM_PKG.in_titleformula()"/>     
    </dataStructure>
    <dataTrigger name="afterReportTrigger" source="XXCUSTOM_PKG.afterreport()"/>
    </dataTemplate>or it's xml data for report?

  • How to send a Varying Array param to a PL/SQL Stored Procedure from Java

    * I am VERY new to jdbc, and even somewhat new to Java
    * I'm using Java 1.5, Oracle 10g.
    * I need to call the following PL/SQL Stored Procedure from Java:
    procedure setEventStatus
    i_deQueueStatus in deQueueStatus_type
    *deQueueStatus_type is the following (an array of deQueueStatus_OBJ):
    CREATE OR REPLACE TYPE deQueueStatus_OBJ as object
    eventID number (20),
    dequeuestatus varchar2(20)
    CREATE OR REPLACE TYPE deQueueStatus_TYPE IS VARYING ARRAY(500) of deQueueStatus_obj
    *I have created a Java object as follows:
    public class EventQueueDeQueueStatus
         long      eventID;
         String      dequeueStatus;
         EventQueueDeQueueStatus(long eventID, String dequeueStatus)
              this.eventID = eventID;
              this.dequeueStatus = dequeueStatus;
    I have an ArrayList of these.
    I need to pass this list to the Stored Procedure. How do I create a java.sql.Array so I can call CallableStatement.setArray to set the parameter? Or do I use something else? I have tried setObject with both the ArrayList and also with a primitive array, but got "Invalid Column Type" both times.
    Any help would be greatly appreciated. I just got this task today, and I have to make it work by Tuesday :-( !
    Thanks,
    Kathy

    Kathy,
    Search the archives of this forum and the JDBC forum for the terms STRUCT and ARRAY and you can find some sample code on the JDBC How-To Documents page and the JDBC Samples which can both be accessed from this page:
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html
    Good Luck,
    Avi.

  • How to call PL-SQL/stored procedure in Creator

    Anybody can tell how to call PL-SQL/Stored procedures inside creator...

    Hi!!!
    You can see this topic http://forum.sun.com/jive/thread.jspa?threadID=106046
    There is how to call oracle stored procedures. Also I put a lot of links in these topic doing reference stored procedures. I have one that it tells specially how to call oracle stored procedures from java, is in spanish but you can understand the code.;-)
    http://yoprogramador.vampisol.com/index.php?title=pl_sql_oracle_desde_java&more=1&c=1&tb=1&pb=1
    Byeee

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • How to call PL/SQL stored procedure using ODBC?

    Could anyone tell me how can I call PL/SQL stored procedure using
    ODBC? Are there any sample codes?
    Thanx!
    null

    You are correct on all counts, they all should work.
    Oracle Product Development Team wrote:
    : Hi,
    : I don't know the exact syntax in ODBC, but reasoning by analogy
    : with other API's, I'd bet one of the following works
    : (for a call to: procedure my_proc(n1 number, n2 number);):
    : "{ my_proc(1,2); }"
    : "{ call my_proc(1,2); }"
    : "{ begin my_proc(1,2); end }"
    : "begin my_proc(1,2); end;"
    : "begin my_proc(1,2); end"
    : Hope this helps. - Pierre
    : jiangbuf (guest) wrote:
    : : Could anyone tell me how can I call PL/SQL stored procedure
    : using
    : : ODBC? Are there any sample codes?
    : : Thanx!
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • Calling stored procedure from JSP

    I call a stored procedure from a JSP, but I want to show a page which tells the user that the query is busy executing (it's a big one!) while the stored procedure is executing. I have a page where I select an option, which forwards the request to the JSP that calls the stored procedure. When the procedure has finished, it must forward to a page that tells the user that the procedure executed successfully. The problem I have is that when I select the desired option and click Submit, the next JSP (which should tell the user that the query is executing) doesn't load until after the stored procedure is finished. How can I display this page while the stored procedure is executing?

    The problem I have is that when I select the desired
    option and click Submit, the next JSP (which should
    tell the user that the query is executing) doesn't
    load until after the stored procedure is finished. How
    can I display this page while the stored procedure is
    executing?
    HAve you got the call to the bit that displays the HTML before or after the call to the stored procedure? If it is before then it should display it...not sure if this is the best solution but if you have a .jsp page that first does the html telling the user to wait and then call the procedure should work...

  • Calling Managed CLR Stored Procedure from C++ SQL Server 2008 fails with Msg 2809

    I am trying to call a stored procedure from C++ (VS 2010).
    Here is what the stored procedure looks like:
    public class Validate
    [Microsoft.SqlServer.Server.SqlProcedure(Name = "ClientTest")]
    public static void ClientTest(out String res )
    { res = "50";}
    To create a stored procedure I deploy at first the assembly
    USE [test]
    GO
    CREATE ASSEMBLY ClientTestAssembly
    AUTHORIZATION testLogin
    FROM 'C:\Users\test\Documents\Visual Studio 2010\Projects\TestCreationAssemblyCSharp\TestCreationAssemblyCSharp\bin\x64\Debug\TestCreationAssemblyCSharp.dll'
    and call 
    USE test
    GO
    CREATE PROCEDURE ClientTest (@res NVARCHAR(40) OUTPUT)
    AS
    EXTERNAL NAME ClientTestAssembly.Validate.ClientTest
    I can call my procedure direct in SQL Server Management Studio without any errors
    declare @res nvarchar(10)
    execute ClientTest @res OUTPUT
    print @res
    But when I try to call this procedure from C++ using CALL syntax
    SQLBindParameter(sqlstatementhandle, 1, SQL_PARAM_OUTPUT, SQL_C_CHAR,
    SQL_VARCHAR , 40, 0, version, sizeof(version) ,
    &pcbValue);
    res = SQLExecDirect(sqlstatementhandle, (SQLCHAR*)("{CALL ClientTest(?) }"), SQL_NTS);
    I get the Error 2809 with SQLSTATE 42000 and with statement 
    The request for 'ClientTest'
    (procedure) failed because 'ClientTest' is a procedure object.
    However, if I wrap my CLR stored procedure into a T-SQL stored procedure, like
    CREATE PROCEDURE myProc (@res NVARCHAR(40) OUTPUT)
    AS
    EXEC ClientTest @res OUTPUT
    and call then myProc instead of ClientTest
    res = SQLExecDirect(sqlstatementhandle, (SQLCHAR*)("{CALL myProc(?) }"), SQL_NTS);
    everithing works fine and I get 50 as result.
    I have no ideas what is the reason for that behavior.
    Thanks very much for any suggestion. 
    Christina

    I'm not an ODBC expert, but you might try following the sample here:
    Process Return Codes and Output Parameters (ODBC)
    To see if it also behaves differently for your CLR proc.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Calling SQL Stored procedure from PLSQL function

    Hi,
    I have created a simple function to return a value that is pulled back from SQL server.
    FUNCTION
    FUNCTION CALC_PASS_FAIL
    i_lidded_sn IN TMP_CHIP_ATTR.LIDDED_SN%TYPE
    RETURN NUMBER
    IS
    tmp_result NUMBER;
    BEGIN
    [email protected](i_lidded_sn,'OadmBarActive',tmp_result);
    RETURN tmp_result;
    END CALC_PASS_FAIL;
    OUTPUT
    --When executed as a procedure, i get the required output:
    DECLARE
    x INT;
    BEGIN
    x:=EQDAS_MISC.CALC_PASS_FAIL('OADM004548');
    dbms_output.put_line(x);
    END;
    0 <------ expected output
    PL/SQL procedure successfully completed.
    When executed as a simple function call, i don't get any output:
    SELECT CALC_PASS_FAIL ('OADM004505') FROM dual;
    Any input will be greately appretiated.
    Thanks,
    Shashi
    PS: I am using the DB Link setup usign DG4MSQL

    just wondering it works as procedure as the function misses double quotes:
    dbo.GetChipPareto
    should be
    "dbo"."GetChipPareto"
    Message was edited by:
    kgronau
    Tested a small example using a function like:
    create or replace function test(
    v_ut1 in varchar2)
    RETURN varchar2
    IS
    v_ut2 varchar2(255);
    BEGIN
    "dbo".OTG_TEST3@dg4msql( v_ut1, v_ut2);
    RETURN v_ut2;
    END test;
    The function calls a SQL Server procedure OTG_TEST3 just returning the passed string and it guarantees data integrity.
    Result using a stored procedure:
    SQL> DECLARE
    2 ret integer;
    3 v_ut1 varchar2(255);
    4 v_ut2 varchar2(255);
    5 BEGIN
    6 v_ut1 :='Hello World';
    7 v_ut2 :='';
    8 "dbo".OTG_TEST3@dg4msql( v_ut1, v_ut2);
    9 dbms_output.put_line('Input value: ' ||v_ut1||' - Output value: '
    ||v_ut2);
    10 END;
    11
    12 /
    Input value: Hello World - Output value: Hello World
    And calling now the function:
    select test('Hello') from dual;
    returns Hello

  • Call a pl/sql stored procedure from a report link

    Hello everyone:
    I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
    In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
    My questions are:
    - Is this the best method to make what I need?
    - How should be the syntax of the link that takes me to another page and run the "stored procedure"
    - How and where I put the function "javascript" to run the "stored procedure"
    BDD: Oracle 11 g
    Apex version 4.1
    Best regards
    Gerard

    Hi,
    Change the link to call an apex.submit process. (javascript).
    Edit:
    I've set up a basic example.
    Region 1 (just so you can see the value getting set):
    select :P27_HIDDEN item_Value
    from dual
    Region 2:
    select rownum id, dbms_random.string('U', 12) sss
    from dual
    connect by level <= 20
    item attributes for ID:
    Target: URL
    URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
    (P27_HIDDEN is just a hidden item i created)
    http://apex.oracle.com/pls/apex/f?p=54920:27
    Edit2:
    In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
    Edit3:
    Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary.

  • Calling ORACLE/SQL stored procedure...

    Hello,
    Is it possible to invoke non-parametrized Stored Procedures (a procedure that, neither having IN parameter nor OUT parameter) from BizTalk.?
    Any suggestion/solution?
    Thanks,
    Prajakt.
    Praj Dixit

    Praj,
    Yes possible.
    Create a .NET helper which will call the stored procedure and handle the return value/recordset from sp and in your BizTalk artifacts call this .NET helper/wrapper to SQL stored procedure. 
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Calling MSSQL SERVER STORED PROCEDURE FROM ORACLE STORED PROCEDURE

    Hi Guys,
    I want to call a stored procedure from mssql server 2005 as part of a stored procedure in PL/SQL. How do I go about this? I've already set up the linked servers.

    http://en.allexperts.com/q/Oracle-1451/2008/6/Calling-SQL-Stored-procedure-1.htm
    Does this help?

  • Running a SQL Stored Procedure from Power Query with Dynamic Parameters

    Hi,
    I want to execute a stored procedure from Power Query with dynamic parameters.
    In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
        Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
    Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
        Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        Name_Value = Name_Parameter{0}[Value],
    I have tried like below but it is not working.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
    Can anyone please help me with this issue.
    Thanks
    Dileep

    Hi,
    I got it. Below is the correct syntax.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
    Thanks
    Dileep

Maybe you are looking for

  • Unable to Delete the request in ODS

    HI Friends,       I am facing the problem with deleting request in ODS.           I deleted the request in cube (PPV Analysis cube). But I unable to delete the request in ODS.     it is showing the message request is already activated;no further QM a

  • Add xmlns tag to Xml file using DBMS_XMLGEN

    I am using Oracle Release 10.1.0.4.2 version . I want to create a xml file according to some data available in the relational database tables. For the same i created object types and then view with the object types since data is scattered in many tab

  • Outer join with lpad

    Hi, We have this basic query which works fine : select pp.upc, a.barcode from ALBUM a, PHYSICALPRODUCT pp where lpad(pp.upc, 13, '0') = lpad(a.barcode, 13, '0') But we wanted to make an outer join. If we take off the lpad, it works. But if we do as b

  • Help! Project Damaged, All Tracks Disappeared!

    My project, which was fine the last time I opened it, now gives me the following messages when I try to open it: "Minor correction of project has taken place (1)" then "Warning! Project may be damaged" When the files opens all the tracks are gone! If

  • 10.5.6 Combo Update not allowing me to select the HD for the install

    I have downloaded the Combo update from Apple's site [around 650Mb]. -Double Clicking the .dmg mounts it. -Double clicking on the mounted icon runs the installer. -After clicking 'Next' a couple of times I have to select the location of the install -