How to display stored procedure results in SJSC table?

I have been able to create a cached rowset and debug/watch the results, but do not understand how to transfer those results to a Table component. Can anyone point me in the right direction?
Details:
In SessionBean1.java, I declared the stored procedure and rowset along with get/set and update procedures:
// SLS trying stored procedure 20060412
    private java.sql.CallableStatement spFXRatesStatement; 
    private CachedRowSetXImpl spFXRatesRowSet = new CachedRowSetXImpl();
    public CachedRowSetXImpl getSpFXRatesRowSet() {
        return spFXRatesRowSet;
    public void setSpFXRatesRowSet(CachedRowSetXImpl crsxi) {
        this.spFXRatesRowSet = crsxi;
    public void updateSpFXRatesRowSet(String inDate, String inCcy) {
        try {
            spFXRatesStatement.setString(1, inDate);
            spFXRatesStatement.setString(2, inCcy);
            spFXRatesRowSet.populate(spFXRatesStatement.executeQuery(), 1);
        catch (Exception e) {
            // TODO - write exception code
// SLS trying stored procedure 20060412I then �prepared� the stored procedure within SessionBean1�s init() procedure:
// SLS trying a stored proc 20060412
        try {
            javax.naming.Context ctx = new javax.naming.InitialContext();
            javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/bmo_fp");
            java.sql.Connection conn = ds.getConnection();
            // spGetFXRates
            spFXRatesStatement = conn.prepareCall("{call GetFXRates(?, ?)}",
                    java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);          
           // next sp...
            // clean up
            ctx.close();
            conn.close();
        catch (Exception e) {
            // TODO - add exception code
// SLS 20060412 I can see the results in a web page procedure with a �getSessionBean1().getSpFXRatesRowSet().getString(i)� watch.
try {
            getSessionBean1().updateSpFXRatesRowSet("9/30/2005","EUR");
            getSessionBean1().getSpFXRatesRowSet().first();
            while (getSessionBean1().getSpFXRatesRowSet().isLast() != true) {
                getSessionBean1().getSpFXRatesRowSet().next();
        catch (Exception e) {
            // TODO - specify error detail
        }Now, how do I transfer these results to a table?

I think you have to add a CachedRowSetDataProvider to you page been.
Then initalize it with your getSpFXRatesRowSet() in the init() method.
Then link you table to the CachedRowSetDataProvider.

Similar Messages

  • How to display stored procedure

    what is the command to display stored procedure through sqlplus.

    If you would like to get a view about the parameters of the procedure, just use
    SQL> desc <procedure name>;
    If you would like to see the code for the procedure, then use (assuming you are logged in as the owner of the procedure)
    SQL> SELECT Text FROM User_Source WHERE Name ='PROCEDURENAME' ORDER BY Line;
    Message was edited by:
    Satish Kandi
    @Dave: Sorry I did not see your post.

  • How to display item procedure results in Search results?

    I have a custom item type based on Image that displays a thumbnail instead of the image itself. This is accomplished using a procedure call and displaying the results with the item and modifying the region attributes to omit the image, but when the items appear in search results, the procedure results are not displayed.
    How do I get an item's procedure results to display in search results?
    TIA

    Are you asking how to pivot the results of the query? Do a search for horizontal looping. If that's not what you are asking, please provide more details.

  • HOW TO GROUP ITEM BY department (MaNganh)/ Category(MaNhom) in XtraReport from Stored Procedure result ?

    I have stored procedure result, i have succeeded bind it to xtrareport. But how can I group item by department (MaNganh) and category (MaNhom) in XTRA REPORT ? Please help me how to solve it ! (SQL SERVER 2008 R2) (DevExpress 10.2.8)

    I've made ​​it, and successful.By add GroupField: 
    GroupField groupField = new GroupField("MaNhom");
               GroupHeader1.GroupFields.Add(groupField);
               tblCell_Group_MaNhom.DataBindings.Add("Text", DataSource, "MaNhom");
    Thank you for HELP! 
    Master Can

  • How to use stored procedures in DIAdem and Can the stored procedures be used to return values?

    Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
    Thanks In advance
    spiya

    Hi Spria,
    I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
    The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
    "select function(parameters) from package"
    ...where package defaults to "dual" if you don't use your own package.
    There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
    dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
    Hope this helps,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Calling_ORACLE_Stored_Procedures_from_DIAdem.doc ‏28 KB

  • How to use Stored Procedure Call in Sender JDBC adapter

    Hi All,
             Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
    Xier

    Hi Xler
    refer these links
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Also, you can check Sriram's blog for executing Stored Procedures,
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    /people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
    This blog might be helpfull on stored procedures for JDBC
    JDBC Stored Procedures
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Please go through these threads and see if it helps...
    Re: How to execute Stored Procedure?
    Re: Problem with JDBC stored procedure
    Thnaks !!

  • How to modify stored procedures in SQL Azure database in SQL server express 2012

    Hi,
    I want to modify stored procedures in SQL Azure database in SQL Server Express 2012. But when right click on the stored procedure in Object Explorer, there is no option "Modify" as for SQL Server database. I wonder how to modify stored procedures in SQL
    Azure database in SQL Server Express 2012. Thanks.
    York

    Hi,
    Not sure whay there is no modify..
    As a workaround can you try this and see if you can modify proc..
    Script Procedure As-> Alter To->New query window..
    - Chintak (My Blog)

  • How to use Stored Procedures in form 6i Blocks

    Dear Friends,
    I would like to know how to use Stored Procedures while creating blocks in Data Block Wizard in forms 6i application.
    Please send me sample code of stored procedure.
    Regards,
    Khader.

    The Data Block Wizard is not for creating stored procedures. It will allow you to use a stored procedure in your form. See the help documentation for how to use the wizard.
    Here's an example of a simple procedure. If you search the database forum or the web, you will find many examples.
    CREATE OR REPLACE PROCEDURE procedure_name (value OUT NUMBER ) AS
    BEGIN
    SELECT COUNT(*) INTO value
    FROM your_table;
    END;
    Message was edited by:
    Mark Roberts

  • HOW TO USE STORED PROCEDURES IN JASPERREPORTS(URJENT)

    Hi,
    i'm using jasperreports in struts based project. How to use stored procedures in jasperreports. pls send the solution urjent
    Thanks in advance
    ramesh

    Hi,
    Refer the below link:
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
    refer the below link which has all the associated action
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Chirag

  • How to use Stored Procedures in JDBC sender side and receiver side

    Hello,
    Can anyone explain how to use stored procedures in configuring the scenario using JDBC adapter at bothe sides sender nad receiver..
    Thanks,
    Soorya

    Hi,
    Refer the below link:
    JDBC:
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
    Stored Procedures-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://www.ics.com/support/docs/dx/1.5/tut6.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
    http://www.sqlteam.com/article/stored-procedures-an-overview
    HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
    refer the below link which has all the associated action
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Chirag

  • How to call stored procedure in hibernate

    hi ,
    can any one help me how to call stored procedure in hibernate.Given code in hbm.xml
    and also plz tell me what is the use of <return-property/>in given hbm.xml file.
    <sql-query name="selectEmployees_SP" callable="true">
         <return alias="emp" class="com.centris.Employee">
    <return-property name="eno" column="eno"/>
    <return-property name="ename" column="ename"/>
    <return-property name="address" column="address"/>
    <return-property name="salary" column="salary"/>
    { ? = call p_retrieve_employees() }
    </return>
    </sql-query>

    Hi,
    Your question isn't related to Java Programming and should be asked in a [Hibernate forum|http://forum.hibernate.org/]
    Kaj

  • How to implement Stored procedure in OBIEE

    Hi experts
    How to implement Stored Procedure in OBIEE..
    My Input is Date..
    Thanks in advance
    Regards
    Frnds

    Double post :
    Re: How to get the previous monthend data and currentdate data in OBIEE report
    You don't need a stored procedure.
    If you want the amount only for one date, you can use the filter option in the formula :
    FILTER("Sales Facts"."Amount Sold" USING (Time.Day = '31 jan'))You can calculate the last day with the timestampdiff function
    31Jan = 1 Feb - 1 dayIf you want the amount of the month see my post here :
    Re: How to get the previous monthend data and currentdate data in OBIEE report

  • How to call stored procedure from Pro*C

    How to call stored procedure from Pro*C ?
    my system spec is SuSE Linux 9.1, gcc version : 3.3.3, oracle : 10g
    my Pro*C code is the following..
    EXEC SQL EXECUTE
    begin
    test_procedure();
    end;
    END-EXEC;
    the test_procedure() has a simple update statement. and it works well in SQL Plus consol. but in Pro*C, there is a precompile error.
    will anybody help me what is the problem ??

    I'm in the process of moving C files (with embedded SQL, .PC files) from Unix to Linux. One program I was trying to compile had this piece of code that called an Oracle function (a standalone), which compiled on Unix, but gives errors on Linux:
    EXEC SQL EXECUTE
    BEGIN
    :r_stat := TESTSPEC.WEATHER_CHECK();
    END;
    END-EXEC;
    A call similar to this is in another .PC file which compiled on Linux with no problem. Here is what the ".lis" file had:
    Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Error at line 193, column 5 in file weather_check.pc
    193 BEGIN
    193 ....1
    193 PCC-S-02346, PL/SQL found semantic errors
    Error at line 194, column 8 in file weather_check.pc
    194 :r_stat := TESTSPEC.WEATHER_CHECK();
    194 .......1
    194 PLS-S-00000, Statement ignored
    Error at line 194, column 18 in file weather_check.pc
    194 :r_stat := TESTSPEC.WEATHER_CHECK();
    194 .................1
    194 PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
    Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /oracle_client/product/v10r2/precomp/ad
    min/pcscfg.cfg
    Error at line 194, column 18 in file weather_check.pc
    :r_stat := TESTSPEC.WEATHER_CHECK();
    .................1
    PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
    Error at line 194, column 8 in file weather_check.pc
    :r_stat := TESTSPEC.WEATHER_CHECK();
    .......1
    PLS-S-00000, Statement ignored
    Semantic error at line 193, column 5, file weather_check.pc:
    BEGIN
    ....1
    PCC-S-02346, PL/SQL found semantic errors

  • How to create stored procedure directely in RPD

    Hi Gurus,
    I am trying to create stored procedure directly in physical table in rpd level in OBIEE.for this one i have gone through below website.
    http://obiee101.blogspot.com/2011/01/obiee-using-mssql-stored-procedure-as.html
    in that blog they mentioned to write some query which is...........
    EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME]
    in above query i am not getting what is DATABASE_NAME,SCHEMA_NAME,PROCEDURE_NAME
    can any one elobrate this one

    Hi nath,
    Firstly are you using MYSQL or Oracle as the database,if its oracle database then follow this
    http://obiee101.blogspot.com/2008/01/obiee-using-oracle-stored-procedure-to.html
    http://oraclebizint.wordpress.com/2008/02/20/oracle-bi-ee-101332-executing-stored-proceduresfunctions-before-reports-before-report-triggers-and-global-temporary-tables/
    EXEC [DATABASE_NAME].[SCHEMA_NAME].[PROCEDURE_NAME][DATABASE_NAME] --> is the database name your creating your procedure
    [SCHEMA_NAME]-->is the user with which your creating
    [PROCEDURE_NAME] --> the name given to procedure
    You dont know how to get those run this SQL in TOAD and see select sys_context('userenv','db_name'), sys_context('userenv','session_user') from dual
    (OR) open you connection pool properties window in RPD,you will get the DB name and the user name as the schema name
    hope answered your question.
    CHeers,
    KK

  • How to retrieve Stored Procedure Output Parameter?

    Hi,
    I'm using a stored procedure with MS SQL Server. The stored procedure creates the required table entries correctly. After executing the procedure i free the resulting recordset reference and am able to retrieve the return value of the stored procedure. However,
    I am not able to retrieve the output parameters of the procedure. I am connected to the database using the MS OLE DB Provider for SQL Server. I tried using ODBC as well. Didn't work either. I know this issue has been addressed before, did anyone come up with a solution for this problem?
    Thanks in advance,
    Marco

    I can tell you what I do with LabSQL and a single output parameter. After I open the connection to the database, I execute a SQL statement that looks like this:
    declare @resultID int
    execute spInsUUTResult @SerialNumber = '999DEBUGXXX',
    @SequenceName = 'Sequence File2.seq',
    @CategoryID = 2,
    @TypeID = 1,
    @StartDateTime = '10-10-2003 13:42:45',
    @ExecutionTime = 3.5698713,
    @UUTStatus = 'Passed',
    @UserName = 'Dennis Knutson',
    @StationName = 'DENNIS-KNUTSON',
    @UUTResultID = @resultID OUTPUT
    This query result is the output parameter. I first debugged the call to the stored procedure in the SQL Server Query Analyzer and then just copied that straight into my LabVIEW code. You may be using something other than LabSQL but you should have a function t
    hat allows for raw SQL commands.

Maybe you are looking for

  • How to Migrate SSIS packages from 32 bit to 64 bit environment

    Hi, We developed many SSIS packages in 32 bit environment using SQL 2008 on windows 2003 server 32 bit OS. In order to utilize the 64 bit features we wish to migrate these packages into a 64 bit. Wanted to know. 1. Whether we can execute these packag

  • How to create a grid based gradient in Illustrator

    I created this randomly degenerating "bitmap" gradient by hand in Illustrator. I want to replicate the effect to fill different sized spaces, but not have to do it by hand every time. Any ideas?

  • Serial command not working in Labview, but it works in docklight

    I am trying to run a RGA via labview. I can control the RGA via docklight (see attachment), but when I try to give the same command to labview, I do not get a responce. What is going wrong? What do I mis in the VI? Best regards, Rens Solved! Go to So

  • Standard Manager  Target node/queue unavailable

    Hello everybody!! I am having problems with SM ( Standard manager ), I see that all my Oracle Applications is working fine, but when I deploy one request ( ex. report ) have error, the request is phase inactive and Status not manager. The button diag

  • Images Jump Around in Book Module - Has anyone seen this happen?

    I have about 45 tiff files in a book collection saved in the Book module.  Once I added the last few pages, images on one page swapped with images on another page.  In addition, an extra page (images on each side, really two pages)  with the same pho