Call the stored package from SQL in the APEX Report Region.

SELECT COUNT (DISTINCT ah.BIB_DOC_NUM) AS "TITLES"
FROM NC_AL_HOL_LOCN ah ,NC_AL_CALL_NUMBER ac
WHERE
ac.CN_STEM>= cross_inst.call_callnojava.callno_parse('A1','A')
AND ac.CN_STEM< cross_inst.call_callnojava.callno_parse('D1','A');
In oracle 10g, I create the package under cross_inst schema.
When I tried to run the page, I got the following parse error page.
===================================
failed to parse SQL query:
ORA-00904: "CROSS_INST"."CALL_CALLNOJAVA"."CALLNO_PARSE": invalid identifier
Any Idea?
Thanks ahead.

The parsing schema of your application needs execute privilege on the cross_inst.callnojava package (a direct grant and not a grant through a role).
Scott

Similar Messages

  • Error while running the SSIS package from SQL DB to excel file - export option

    hi all,
     I have 4.6 million records  in my sql db  and i want to copy this into a  excel file. for this i went to the db    and rt click and export to command and started the ssis package running.  but after
    few minutes, it throws me  an error that "error in transferring data into excel file."
    Can anyone help me why this happened and the resolution ?
    help is appreciated!
    Copying to `excel1_Wbook` (Error)
    Messages
    Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x8007000E.
     (SQL Server Import and Export Wizard)
    Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - excel1_Wbook" (217) failed with error code 0xC0202009 while processing input "Destination Input" (228).
    The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information
    about the failure.
     (SQL Server Import and Export Wizard)
    Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
     (SQL Server Import and Export Wizard)
    Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Source - excel1_Wbook returned error code 0xC02020C4.  The component returned a failure code when the pipeline engine called PrimeOutput(). The
    meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
     (SQL Server Import and Export Wizard)

    You need to split your data and create (at least 5) worksheet targets.
    For example if you have a ROW_NUMBER column you can use for instance a
    Conditional Split for something like:
    ROW_NUMBER % 5 == 0 for Case 1 (excel 1)
    ROW_NUMBER % 5 == 1 for Case 2 (excel 2)
    ROW_NUMBER % 5 == 2 for Case 3 (excel 3)
    ROW_NUMBER % 5 == 3 for Case 4 (excel 4)
    ROW_NUMBER % 5 == 4 for Case 5 (excel 5)

  • Call procedure's package from sql query ?

    Hi,
    I've write a package. In this package there is a procedure A with this parameters (in x, in y, out z).
    In the second procedure B, i want te create a cursor like this :
    'select * from table where table.fiels in ( A.(x,y) )'
    Is it possible to do this ?
    Thanks for the answer.

    I think so. Could you flesh out your code a little more? Yes of course, this is my PLSQL code :
    /*This is the first procedure */
    procedure Get_IDGeneriques(i_idfamille in generiquesliensfamilles.idfamille%type, i_idprofil in generiqueslienslistesmono.idlisteprofil%type, i_idconstitution in generiqueslienslistesmono.idlisteconstitution%type, i_idserie in generiqueslienslistesmono.idlisteseriefraises%type, i_idpas in generiqueslienslistesmono.idlistepasfraises%type, i_idtypeattache in generiqueslienslistesmono.idlisteattache%type, i_idlisteSensISO in generiqueslienslistesmono.idlisteSensISO%type, i_idlistearrosagecentre in generiqueslienslistesmono.idlisteArrosageCentre%type, i_listematieres in varchar2, i_listemachines in varchar2,i_listeopes in varchar2, o_idgenerique out tbl_bin_int)
    is
    BEGIN
    DECLARE
    TYPE TypeCursorReq IS REF CURSOR;
              test TypeCursorReq;
    sqlstm VARCHAR2(4000);
    recordcount number default 0;
    idgenerique generiqueslienslistesmono.idref%type;
    BEGIN
    sqlstm := 'SELECT GENERIQUESLIENSLISTESMULTI.IDGENERIQUE FROM GENERIQUESLIENSLISTESMULTI, GENERIQUESLIENSLISTESMULTI GENERIQUESLIENSLISTESMULTI1, GENERIQUESLIENSLISTESMULTI GENERIQUESLIENSLISTESMULTI2
    WHERE GENERIQUESLIENSLISTESMULTI.IDGENERIQUE = GENERIQUESLIENSLISTESMULTI1.IDGENERIQUE AND GENERIQUESLIENSLISTESMULTI.IDGENERIQUE = GENERIQUESLIENSLISTESMULTI2.IDGENERIQUE AND (GENERIQUESLIENSLISTESMULTI.TYPE1 =''MT'')
    AND GENERIQUESLIENSLISTESMULTI.IDLISTE IN (' || i_listematieres || ') AND (GENERIQUESLIENSLISTESMULTI1.TYPE1 =''OP'') AND GENERIQUESLIENSLISTESMULTI1.IDLISTE IN (' || i_listeopes || ') AND GENERIQUESLIENSLISTESMULTI2.TYPE1 =''MA''
    AND GENERIQUESLIENSLISTESMULTI2.IDLISTE IN (' || i_listemachines || ')';
    OPEN test for sqlstm;
                        LOOP
                        FETCH test INTO      idgenerique;
                        EXIT WHEN test%NOTFOUND;
    recordcount := recordcount+1;
    o_idgenerique(recordcount) := idgenerique;
    END LOOP;
    END;
    end;
    /* This is the second procedure who call the first one */
    procedure Get_IDOutils(i_idfamille in generiquesliensfamilles.idfamille%type, i_idprofil in generiqueslienslistesmono.idlisteprofil%type, i_idconstitution in generiqueslienslistesmono.idlisteconstitution%type, i_idserie in generiqueslienslistesmono.idlisteseriefraises%type, i_idpas in generiqueslienslistesmono.idlistepasfraises%type, i_idtypeattache in generiqueslienslistesmono.idlisteattache%type, i_idlisteSensISO in generiqueslienslistesmono.idlisteSensISO%type, i_idlistearrosagecentre in generiqueslienslistesmono.idlisteArrosageCentre%type, i_listematieres in varchar2, i_listemachines in varchar2,i_listeopes in varchar2, o_idoutil out tbl_bin_int)
    is
    BEGIN
    DECLARE
    TYPE TypeCursorReq IS REF CURSOR;
              test TypeCursorReq;
    sqlstm VARCHAR2(4000);
    recordcount number default 0;
    idoutil outilslienslistesmono.idref%type;
    BEGIN
    sqlstm := 'SELECT * FROM OUTILSLIENSLISTESMONO,LIENSGENERIQUESOUTILS
    WHERE OUTILSLIENSLISTESMONO.IDRef = LIENSGENERIQUESOUTILS.IDRefOutilFabMati
    AND LIENSGENERIQUESOUTILS.IDRefGeneFabMati in (Get_IDGeneriques(1,232,22,47,26,210,206,50,''10444,10448,10451'',''10337'',''10319'') )';
    OPEN test for sqlstm;
                        LOOP
                        FETCH test INTO      idoutil;
                        EXIT WHEN test%NOTFOUND;
    recordcount := recordcount+1;
    o_idoutil(recordcount) := idoutil;
    END LOOP;
    END;
    end;
    END TITAN2;

  • How to view  a stored procedure from sql plus

    Can anyone please tell what is the command for viewing the content of the stored procedure from sql plus ?
    Thanks

    Hi,
    I use this simple script to retrieve.......
    EDTRAD@T_E_S_9-->l
    1 select text from all_source where name = 'GET_MAN' -- proc name here
    2* order by line asc
    EDTRAD@T_E_S_9-->/
    TEXT
    FUNCTION get_man (in_man SSBOSS.CLNTWORK.manager%type)
    RETURN varchar2 IS
    CURSOR get_man(in_man SSBOSS.CLNTWORK.manager%type) IS
    SELECT name
    FROM ssboss.clntwork
    WHERE agency = 'TM'
    AND manager = in_man
    AND manager is not null
    AND manager != '**OB**';
    v_man SSBOSS.CLNTWORK.name%type := null;
    BEGIN
    OPEN get_man(in_man);
    FETCH get_man INTO v_man;
    IF get_man%notfound THEN
    v_man := 'Manager Not Found !';
    RETURN (v_man);
    CLOSE get_man;
    END IF;
    RETURN (v_man);
    CLOSE get_man;
    END;
    21 rows selected.
    EDTRAD@T_E_S_9-->

  • How to write a procedure to run the call the custom package from backend

    Hi All
    Oracle 10g
    Oracle Apps R12
    I am working with oracle order management here we have a customize Package called (Pick Release).Due to some problem we have running this concurrent program by manually giving Route_id as parameter. The route_id is taken from the route Table. By using this query
    select distinct route_id from route@DB_LINK_APPS_TO_ROADSHOW
    where trunc(route_date) = trunc (sysdate+2).
    so daily we have nearly 42 routes and we are running this concurrent program manually nearly times.
    so now how to write a procedure for this
    Step 1 Getting the route from route table.( By cursor we can get the route_id Accordingly)
    Step 2 How to trigger the custom package from back end and execute accordingly to that output of the cursor(route_id)
    If the cursor get 40 routes is it then the concurrent program runs 40 times according to that route_id.
    can some could provide the steps to do this
    Thanks & Regards
    Srikkanth.M

    This is about 4 or 5 lines of PL/SQL and the name of the custom package is not provided.
    If you request someone in this forum to do your work for free -because obviously you didn't even try to write it, which must be considered abusing this forum- you must at least provide sufficient info so someone can do it.
    And no, I won't do it for you.
    Sybrand Bakker
    Senior Oracle DBA

  • Call the web packager from a KO??

    Hello!
    I'm having a bit of a senior moment here and could use some
    help - is
    there anyway to call the Web Packager from inside a KO built
    with
    Authorware? I can output an EXE with PackageFile() from
    inside the KO,
    but don't see an obvious way to go the next step and web
    package the file.
    tia,
    Mark Henry

    "Mark Henry" <[email protected]> wrote in
    message
    news:e8k36r$mc1$[email protected]..
    > Hello!
    >
    > I'm having a bit of a senior moment here and could use
    some help - is
    > there anyway to call the Web Packager from inside a KO
    built with
    > Authorware? I can output an EXE with PackageFile() from
    inside the KO, but
    > don't see an obvious way to go the next step and web
    package the file.
    >
    Have you tried launching obp.exe? Maybe it can be launched
    from a command?
    Steve
    ACE - Adobe Community Expert, Authorware
    My blog -
    http://stevehoward.blogspot.com/
    Authorware tips -
    http://www.tomorrows-key.com

  • Whats the difference between executing a package from SQL and Visual Studio?

    Hi,
    We have a package that is currently failing to run when deployed to SQL. This has been tried from a schedule and also executed manually both are failing.
    I have tried from Visual studio running on various machines (windows 8, server 2012) and in all cases run perfectly.
    I am trying to understand the differences between deploying to SQL and running from VS so maybe I can figure out why this is happening.
    I have the following errors when I run from SQL.
    DTS_E_PROCESSINPUTFAILED - all errors like this point to the 'Sort' tasks in the script
    dts_e_processinputerror not enough storage is available
    I have tested in four environments and all fail from SQL but not from VS!
    Last night I tried from my laptop and executed the package from SQL - it didn't fail but was still running in the morning so I terminated. Note this takes around 20 mins running from VS! why would it be so quick from VS but fail or take so long on SQL?
    The test running at the moment is on a server with dynamic memory currently at 14GB. I decreased SQLs RAM to 4GB and it hasn't failed yet but has been running for two hours. Before changing this the package failed after a short time.
    I thought it may have something to do with running from a virtual machine but doesn't explain why it couldn't run locally on my laptop.
    All ideas welcome :) Many thanks,
    Davina

    I will try to address issues one by one
    The error doesn't seems to be related to SSISDB configuration mode. It may be because of
    Change in package definition (please confirm that the package which you are running on your laptop is the same on your msdb? - reload your SQL package from MSDB in BIDS/SSDT and recreate your source and destination components)
    As your error message shows, "not enough memory available" (may be because of multicast)  - Usually you can override this error by restarting SQL Server [not an optimal solution but it work & if that work it shows that your package fills
    the memory - Keep an eye on task manager]
    Make sure that your statics on table are updated [run EXEC sp_updatestastics] 
    Make sure your indexes are not de-fragmented [run rebuild indexes]
    If you are dealing with many rows may be 40000 * 12 (because of multicast) = 4,800,000 rows the try to separate package. 
    Check your excel file format/column data type is correct
    Check user permission who is running the job has required permission on folder/file.
    Understand that sort is a blocking transformation and it requires all your data in memory before it sorts. so, if there are large number of rows then your complete memory will be occupied. 
    Difference between Visual Studio & BIDS/SSDT
    Nothing much, other than BIDS runs on 32 bit while jobs on 64 bit (but there run time environment are configurable, though) 
    There shouldn't be any performance difference until your
    package is on network location because transferring data to the network may slow the package. If package runs on SQL Server it uses SQL buffer pool to fetch data via SQL statement and then SSIS works on its own memory allotment. 
    Hope this will help you to understand and fix the issue.
    Glad to help! Please remember to accept the answer if you found it helpful. It will be useful for future readers having same issue.

  • Import/export only the stored procedure from DMP

    Hi all,
    pls tell how to import/export only the stored procedure from a DMP file.
    Best Regards,
    Subir

    pls tell how to import/export only the stored
    procedure from a DMP file.If you on 10g or above use expdp / impdp for import/export only the SP.
    Overview of Oracle Data Pump
    - Virag Sharma
    http://virag.sharma.googlepages.com
    http://viragsharma.blogspot.com/

  • ECC5 How to read the stored value from Team Viewer

    Hi,
    How can I pick up the stored value from the team viewer from within ECC5?
    I would normally use FM 'HR_ASR_WDA_GET_EMPLOYEE'  to read mem id MSS01 but this doesn't exist in ECC5.
    All help appreciated.
    Rob

    Hi,
    How can I pick up the stored value from the team viewer from within ECC5?
    I would normally use FM 'HR_ASR_WDA_GET_EMPLOYEE'  to read mem id MSS01 but this doesn't exist in ECC5.
    All help appreciated.
    Rob

  • Cannot call ANY stored functions from my Java program

    My problem is that I cannot call ANY stored procedure from my Java
    program. Here is the code for one of my stored procedures which runs
    very well in PL/SQL:
    PL/SQL code:
    CREATE OR REPLACE PACKAGE types AS
    TYPE cursorType IS REF CURSOR;
    END;
    CREATE OR REPLACE FUNCTION list_recs (id IN NUMBER)
    RETURN types.cursorType IS tracks_cursor types.cursorType;
    BEGIN
    OPEN tracks_cursor FOR
    SELECT * FROM accounts1
    WHERE id = row_number;
    RETURN tracks_cursor;
    END;
    variable c refcursor
    exec :c := list_recs(11)
    SQL> print c
    COLUMN1 A1 ROW_NUMBER
    rec_11 jacob 11
    rec_12 jacob 11
    rec_13 jacob 11
    rec_14 jacob 11
    rec_15 jacob 11
    Here is my Java code:
    import java.sql.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    class list_recs
    public static void main(String args[]) throws SQLException,
    IOException
    String query;
    CallableStatement cstmt = null;
    ResultSet cursor;
    // input parameters for the stored function
    String user_name = "jacob";
    // user name and password
    String user = "jnikom";
    String pass = "jnikom";
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    try { Class.forName ("oracle.jdbc.driver.OracleDriver"); }
    catch (ClassNotFoundException e)
    { System.out.println("Could not load driver"); }
    Connection conn =
    DriverManager.getConnection (
    "jdbc:oracle:thin:@10.52.0.25:1521:bosdev",user,pass);
    try
    String sql = "{ ? = call list_recs(?) }";
    cstmt = conn.prepareCall(sql);
    // Use OracleTypes.CURSOR as the OUT parameter type
    cstmt.registerOutParameter(1, OracleTypes.CURSOR);
    String id = "11";
    cstmt.setInt(2, Integer.parseInt(id));
    // Execute the function and get the return object from the call
    cstmt.executeQuery();
    ResultSet rset = (ResultSet) cstmt.getObject(1);
    while (rset.next())
    System.out.print(rset.getString(1) + " ");
    System.out.print(rset.getString(2) + " ");
    System.out.println(rset.getString(3) + " ");
    catch (SQLException e)
    System.out.println("Could not call stored function");
    e.printStackTrace();
    return;
    finally
    cstmt.close();
    conn.close();
    System.out.println("Stored function was called");
    Here is how I run it, using Win2K and Oracle9 on Solaris:
    C:\Jacob\Work\Java\Test\Vaultus\Oracle9i\FunctionReturnsResultset>java
    list_recs
    Could not call stored function
    java.sql.SQLException: ORA-00600: internal error code, arguments:
    [ttcgcshnd-1], [0], [], [], [], [], [], []
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
    at
    oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:490)
    at
    oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.java:2661)
    at
    oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4189)
    at
    oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4123)
    at
    oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:541)
    at list_recs.main(list_recs.java:42)
    C:\Jacob\Work\Java\Test\Vaultus\Oracle9i\FunctionReturnsResultset>
    Any help is greatly appreciated,
    Jacob Nikom

    Thank you for your suggestion.
    I tried it, but got the same result. I think the difference in the syntax is due to the Oracle versus SQL92 standard
    conformance. Your statament is the Oracle version and mine is the SQL92. I think both statements are acceptable
    by the Oracle.
    Regards,
    Jacob Nikom

  • Calling a stored procedure from within a ViewObject

    Is it possible to make stored procedure call from within a BC4J ViewObject? Basically something like this:
    select * from table(f1(3)); where f1 is a table function. Using Oracle's pipelined table functions?
    If not, is it possible to call a stored procedure from Java and have the returned results be put back into a BC4J RowSet.
    In addition, is there a way to create a JDBC Resultset from a BC4J RowSet?
    We need to be able to dynamically create our SQL statements (the entire SQL, not just the where clause) but are required to have these sql statements generated/executed from within a pl/sql stored procedure in the database.

    Is it possible to make stored procedure call from within a BC4J ViewObject? Basically something like this:
    select * from table(f1(3)); where f1 is a table function. Using Oracle's pipelined table functions?
    Yes. Using our expert-mode query feature this is possible.
    is it possible to call a stored procedure from Java and have the returned results be put back into a BC4J RowSet.
    Yes. See this article about basing a view object on a REF CURSOR:
    http://radio.weblogs.com/0118231/2003/03/03.html
    In addition, is there a way to create a JDBC Resultset from a BC4J RowSet?
    No. Not directly. What's the business requirement here so I can understand better?
    We need to be able to dynamically create our SQL statements (the entire SQL, not just the where clause) but are required to have these sql statements generated/executed from within a pl/sql stored procedure in the database.
    REF CURSOR would work fine, or if it's just the statement that needs to be generated dynamically, you could fetch the text of the SQL statement from the stored procedure, then use createViewObjectFromQueryStmt(). Although this has runtime overhead involved with describing the query.
    The REF CURSOR based approach is probably best for this.

  • Calling a stored procedure from a url

    I am needing to call a stored procedure from a url string (or
    anchor) understand that from training to be as follows:
    http://host:port/pls/dad/package.procedure?query_string
    With that in mind, I am getting an error as follows:
    Not Found
    The requested URL /pls/portal30/at_hrfm.checkshow.showcheck was
    not found on this server.
    Here is a sample of my url
    http://servername:port/pls/portal30/at_hrfm.checkshow.showcheck
    I can see servername:port/pls/portal30, it is just the
    procedure I am having a problem with.
    Here is a sample of my source code that is created under the
    at_hrfm schema (I also tried under portal30 schema).
    package body checkshow as
    procedure showcheck as
    begin
    htp.htmlOpen;
    htp.headOpen;
    htp.title('My Check');
    htp.comment ('This should be your Check');
    htp.bodyOpen;
    htp.header (1,'Check');
    htp.print ('checkdate');
    htp.bodyClose;
    htp.headClose;
    htp.htmlClose;
    end;
    end;

    I think I figured this out. I don't think the grant to ANONYMOUS is going to work with production XE and the online documentation is in need of an update. It appears that production XE has been locked down and you will need to specify the name of each stored procedure you wish to allow to be executed by adding it to the WWV_FLOW_EPG_INCLUDE_MOD_LOCAL function. This is spelled out in more technical detail here: http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/adm_wrkspc.htm#BEJCGJFJ
    Another alternative that would work involves creating a separate DAD. Using the DAD approach with my schema made all of my stored procedures callable from a web browser, so I rejected this approach. To make this usable (secure) I would have needed to create and maintain a separate database user for the DAD and then only granted it execute for the stored procedures I wanted to be callable from a URL.
    Finally I read about using an on-demand procedure and having it invoke the desired stored procedure. While I didn't try this out, it sounds like another good approach because it maintains session security. If it can be used to return an image I do not know.
    - Jim

  • Problem in calling Oracle stored procedure from Java.

    I am trying to invoke the Oracle stored procedure from Java. The procedure does not take any parameters and does not return anything. If I call it from SQL prompt it is working perfectly. I am calling it in my program as follows.
    callable_stmt=con.prepareCall("{call pkg_name.proc_name()}");
    callable_stmt.execute();
    The problem is the control-of-flow is getting strucked in the second line I wrote. It is not giving any error also.
    Please clarify me what's wrong with my code?
    Seenu.

    And how long does the stored procedure take to run from your client machine when running it via sqlplus?

  • Calling Oracle Stored Procedure from BC4J JSP App

    I am on an extremely tight deadline and am trying to get my JSP application to use an Oracle Stored Procedure. I need to take some input from the user and send these values as parameters. Has anyone worked with Stored Procedures in JDev3.1? Please reply with some sample code if possible.
    Thanks.

    Hi,
    Someone posted a similar request the other day. Here is my response to them:
    Basically, you need to create a custom method from your JSP's ViewObject, which calls the stored procedure. You can then call the ViewObject's custom method from the JSP client.
    Here is how I have done it:
    1. Choose the ViewObject that your JSP is based on and choose 'Edit' from the context menu.
    2. On the Java tab of the ViewObject wizard, choose Generate Java File checkbox for the View Object Class and click the Finish button. A file is created under the ViewObject node in the Navigator named 'viewobjectImpl.java'.
    3. Open the viewobjectImpl.java file in the code editor and create a method to call your stored procedure (see sample code below).
    4. Compile the VOImpl.java file.
    5. Choose the view object again, and choose Edit again from the context menu.
    6. On the Client Methods tab, you should now see your method appear in the Available field. Select it and shuttle it to the Selected field.
    7. Click Finish to leave the VO wizard, and rebuild your Business Components project.
    8. In your JSP, call the custom method (see sample code below).
    sample code for custom method calling a stored procedure from VOImpl.java file:
    public int getTotalHits(String mon, String year) {
    CallableStatement stmt = null;
    int total;
    // the call to the PL/SQL stored proc
    String totalhits = "{? = call walkthru.total_hits(?,?)}";
    // use the AM conxn 2 call storedproc
    stmt = getDBTransaction().createCallableStatement(totalhits, 1);
    try
    // Bind the Statement Parameters and //Execute this Statement
    stmt.registerOutParameter(1,Types.INTEGER);
    stmt.setString(2,mon); stmt.setString(3,year);
    stmt.execute();
    total = stmt.getInt(1);
    catch (Exception ex)
    throw new oracle.jbo.JboException(ex);
    finally
    try
    stmt.close();
    catch (Exception nex)
    return total;
    sample render code for calling custom method from JSP custom bean:
    public void render() {
    int totalhits;
    try
    Row[] rows;
    // Retrieve all records by default, the qView variable is defined in the base class
    qView.setRangeSize(-1);
    qView.first();
    rows = qView.getAllRowsInRange();
    // instantiate a view object for our exported method
    // and call the stored procedure to get the total
    ViewObject vo = qView.getViewObject();
    wtQueryView theView = (wtQueryView) vo;
    totalhits = theView.getTotalHits(session.getValue("m").toString(),session.getValue("y").toString());
    out.println(totalhits);
    } catch(Exception ex)
    throw new RuntimeException(ex.getMessage());
    }

  • Calling invalid stored procedure from java

    Will the stored procedure which is invalid get re-compiled automatically when called from a java program?
    1.a stored procedure is invalid (oracle 9i)
    2.calling the stored procedure from a java program
    3.what will happen a.oracle recompiles the stored procedure
    b.returns an sql exception
    what happens,kindly help
    drop your mail to [email protected]
    Keep Smiling and Mailing,
    Vijay Anand Natesan.

    thank you ..Kindly let me know if any of your friends have tried this

Maybe you are looking for