How to call stored procedure in ASP pages

After I migragate MS SQL server database to Oracle 8i database, all the call to stored procedure in ASP has problems. I have been had a problem to find some document about how to call oracle stroed procedure from SQL*plus or using ADO. If anybody can help me to find any resource about it. or better give me some examples, that will be very helpful.
Thanks!
null

If you have account on Metalink.
Please go there and do a search on ASP.
There you can find, how to call SP from
ASP.
If you have problem finding this let
me know.
I will try to find it

Similar Messages

  • 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 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 call stored procedures from EF 6.1.3

    Hi
    I need to create many reports and I wanna use SPs, with parameters, the question is how to use it from ntity Framework CodeFirst ? I am using EF 6.1.3
    I 've found examples using EF but not EF CF, any sample please ?
    thanks in advance
    Salu2 Sergio T

    You create a type to return and pass it as a type...
    Like this:
    http://stackoverflow.com/questions/20901419/how-to-call-stored-procedure-in-entity-framework-6-code-first
    context.Database.SqlQuery<YourEntityType>("storedProcedureName",params);
    ps
    That was pretty easy to google, by the way.
    And... it's not really wpf.
    Shrug.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Problem call stored procedure from asp using oo4o

    I am having a problem calling a pl/sql stored procedure from ASP.
    Attached is the code. Any help would be appreciated. There are no errors returned on the page as far as I can tell.
    Sub add_cc_rec(p_location_rental_object_num, p_start_date, p_end_date, p_rate_code, p_quantity)
         'On Error Resume Next     
         Dim msg, stat, p_available, p_free_sell, p_cap_level, p_status_code, p_error_code
         Dim OraDatabase, PlSqlStmt
         Response.Write "In Function add_cc_rec<br>"
         msg = ""
         stat = ""
         p_available = "Y"
         p_free_sell = "Y"
         p_cap_level = "0"
         p_status_code = 2
         p_error_code = ""
         Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
         Response.Write "Created OraSession<br>"
         Set OraDatabase = OraSession.OpenDatabase(ORADB, RUUID &"/"& RUPWD, 0)
         'Set OraDatabase = OraSession.DbOpenDatabase(ORADB, RUUID &"/"& RUPWD,cint(0))
         'Set OraDatabase = OraSession.DbOpenDatabase(ORADB, UID &"/"& PWD,cint(0))
         Response.Write "Created OraDatabase with the following parameters<br>"
         Response.Write "Database is " & ORADB & "<br>"
         Response.Write "UserId is " & RUUID & "<br><br>"
         OraDatabase.Parameters.Add "p_location_rental_object_num", p_location_rental_object_num, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_available", p_available, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_start_date", p_start_date, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_end_date", p_end_date, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_free_sell", p_free_sell, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_quantity", p_quantity, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_cap_level", p_cap_level, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_rate_code", p_rate_code, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_status_code", p_status_code, ORAPARM_OUTPUT, ORATYPE_NUMBER
         OraDatabase.Parameters.Add "p_error_code", p_error_code, ORAPARM_OUTPUT, ORATYPE_VARCHAR2
         Response.Write "Calling PL/SQL procedure cc_insert <br>"
         Set PlSqlStmt = OraDatabase.CreateSQL("Begin RATELINK_CAPACITY_CONTROL.cc_insert(:p_location_rental_object_num, :p_available, :p_start_date, :p_end_date, :p_free_sell, :p_quantity, :p_cap_level, :p_rate_code, :p_status_code, :p_error_code); end;", ORASQL_DEFAULT)
         Response.Write "PL/SQL procedure cc_insert has been called <br>"
         Response.Write "Status code from PL/SQL procedure cc_insert (" & OraDatabase.Parameters("p_status_code").value & ")<br>"
         Response.Write "Error code from PL/SQL procedure cc_insert (" & OraDatabase.Parameters("p_error_code").value & ")<br>"
         'Response.Write "Error code from PL/SQL procedure cc_insert (" & p_error_code & ")<br>"
         OraDatabase.Parameters.Remove "p_location_rental_object_num"
         OraDatabase.Parameters.Remove "p_available"
         OraDatabase.Parameters.Remove "p_start_date"
         OraDatabase.Parameters.Remove "p_end_date"
         OraDatabase.Parameters.Remove "p_free_sell"
         OraDatabase.Parameters.Remove "p_quantity"
         OraDatabase.Parameters.Remove "p_cap_level"
         OraDatabase.Parameters.Remove "p_rate_code"
         OraDatabase.Parameters.Remove "p_status_code"
         OraDatabase.Parameters.Remove "p_error_code"
         Set OraSession = Nothing
         Set OraDatabase = Nothing
    End Sub

    1 - Can I clear errors on the OraDatabase class. How do
    I do that?They store the last error, should clear itself.
    2. Is this a client side or server side error? If this
    is a client side error, how do I resolve it?Server side error only. Make sure the user you connect as can see 'RATELINK_CAPACITY_CONTROL.CC_INSERT' and has execute permissions on it. You may need to qualify it with a schema name if the connected user is not the schema owner.

  • How to call Stored Procedure in OWB?

    Hi,
    I'm not able to call stored procedures in the OWB. There are transformations available to call the functions namely Mapping Transformation, but i didnt find any such transformation for stored procedures.
    I was able to validate, generate ad deploy the stored procedure, but coudn't find any trasnformation which calls the stored procedure.
    And my source and the target are in the same schema, hence a connector module is also not needed.
    Can anyone help me in this regard and explain how to call a stored procedure in the Oracle Warehouse Builder?

    Hi Patrick,
    Thanks a lot for your reply.
    Hey Patric, sorry to bug you again.
    Regarding calling the Stored procedure, mine is a very simple scenario.
    I have created a table with two fields say A and B. My stored proc takes an input A1. The stored proc then selects the B field from that table when A1 has the same value as A.
    Then i check the condition, if the selected value is null then set the output variable to 'N'. Else to 'Y'.
    The logic that i'm following in OWB is:
    1.) create a mapping which contains the source as a table.
    2.) Give the field A in that table as an input to the Stored procedure which i can have it my Mapping Trasformation.
    3.) Then i need to specify the condition that the field A in the table should be equal to A1. And if equal, then fetch the value from the table and display either 'Y' or 'N' based on the condition that is checked in the Procedure.
    But the problem here i'm facing is that,i'm not able to store the output into a file, since the procedure doesnot return a value. And my target is a file.
    should i need to change my logic.
    Regards,
    Abhinav.

  • How to call Stored procedure in SMP 2.3 ?

    HI Experts,
    I have stored procedure in SQL Server, in that i have Select query with WHERE Condition, how to call that procedure in SMP Application .

    Do you want to create mbo from that stored procedure?  Not sure if this document helps you Example: Parameters and Stored Procedures

  • How to call stored procedures from java program?

    I have tried to run a program that calls a stored procedure on MySQL
    server version 5.0.17 by using connector/j 5.0, but it always fails on the
    statement: con.preparecall() ,
    have looked on the internet and found out that people can all mysql
    stored procedure all right in their programs, really dont know what's
    wrong with this small peiece of code:
    import java.sql.*;
    public class TestDB {
          // procedure being called is:
         CREATE PROCEDURE `dbsaystorm`.`getsite` ()
         BEGIN
            select  name  from tblsite;
         END
         public static void main(String[] args) {
              try  {
                  //Class.forName("org.gjt.mm.mysql.Driver");
                  Class.forName("com.mysql.jdbc.Driver");
                  Connection con = DriverManager.getConnection("jdbc:mysql://localhost/dbname",
                            "user", "pwd");
           * executing SQL statement here gives perfect correct results:
            // PreparedStatement ps = con.prepareStatement("select name from tblsite");      
            // ResultSet rs =ps.executeQuery();
                  // but in stored procedure way...
                  //it fails here on this prepare call statement:             
                  CallableStatement proc = con.prepareCall("call getsite()");
                  ResultSet rs =proc.executeQuery();                      
                  if (rs == null) return;                                      
                  while (rs.next()){                 
                      System.out.println("site name is: "+ rs.getString(1));                                
                  rs.close();
              } catch (SQLException e) {e.printStackTrace();}
               catch (Exception e) {e.printStackTrace();}         
    }it always gives this exception:
    java.lang.NullPointerException
         at com.mysql.jdbc.StringUtils.indexOfIgnoreCaseRespectQuotes(StringUtils.java:959)
         at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1280)
         at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:3668)
         at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:638)
         at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:453)
         at com.mysql.jdbc.Connection.parseCallableStatement(Connection.java:4365)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4439)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4413)
         at saystorm.server.data.database.TestDB.main(TestDB.java:29)
    where have I gone wrong?
    when I commented out the statement that makes the procedure call and call preparedstatement to execute SQL select statement, it gave perfectly correct result.
    it looks like there is no problem with java prog accessing MYSQL server database, but the it seems that it's just java can't call stored procedure stored on the mysql server version 5.
    can it or can't it? if it can, how is that accomplished?

    It is a bug in the driver because it shouldn't be
    returning that exception (null pointer) even if you
    are doing something wrong.
    Are you using the latest version of the driver?
    The stored procedure runs when you run it from the
    gui/command line using a MySQL tool - correct?
    As suggested you should be using the brackets. What
    is the data type of the 'name' field?
    You could try returning another value like one of the
    following
    select 1, name from tblsite;
    select name, 1 from tblsite;
    That might get around the bug
    Additionally try just the following...
    select 'test' from tblsite;yes, the driver used is in connector/j 5.0--the lastest one, and the
    procedure can run correctedly at either command line or GUI mode
    with no problem whatsoever, the returned data type is string type,
    I have not got the chance to test it again with those values you
    suggested, as I have abandoned the laptop I used to write that code
    initately. There have been some other really weird cases happened on
    that computer. I guess that must be something wrong with the JVM
    installed on it, it was upgraded from jre5.0.04 to 06, and to 09.
    something within hte JVM must have been messed up(the only reasonable
    explanation). Because the same code runs correctly on my new laptop,
    using the same environment: jvm 5.0_09, mysql 5.0.18, connector/J 5.0.
    that old laptop really was a nightmare.

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • How to call stored procedure from javascript? (about Google Suggest, AJAX)

    Hi I want to implement a text field so that it behaves like [Google Suggest|http://www.google.com/webhp?complete=1&hl=en] .
    I read this post .
    Now I've setup everything according to that document. But it just doesn't work. And I don't know why.
    I think problems may fall into the following three categories:
    1. Does the text field and the page invoke the proper javascript?
    2. Does the javascript successfully call the stored procedure?
    3. Can the stored procedure correctly return the formatted result?
    I am affirmative for 1 and 3, but I'm not sure about 2. Because I don't know how to tell if a stored procedure has been called? Is there a PL/SQL statement that I can query in SQL*Plus?
    Also, I would to know how to debug AJAX in APEX. It involves many things.
    Last, I used APEX 3.2 and Oracle XE. I cannot find either dads.conf or marvel.conf file. Is "/apex/" the virtual directory for APEX?
    Thanks a lot!

    Hello,
    I recently also ran into problems with this and I will post my solution here:
    1) if you need to pass parameters to your procedure, create it using "Flexible Parameter Passing". Then parse the parameters out of the array and put them in local variables inside your PL/SQL procedure.
    Example:
    CREATE OR REPLACE PROCEDURE MATTHIASH.incsearch(name_array IN owa.vc_arr,
         value_array IN owa.vc_arr) as
      l_List1 varchar2(4000);
      l_List2 varchar2(4000);
      l_query varchar2(255);
      l_separator varchar2(10) default '';
      qu varchar2(4000) default '';
      hl varchar2(4000) default '';
    BEGIN
      FOR i IN 1 .. name_array.COUNT 
      LOOP
           IF name_array(i) = 'qu' THEN
                qu := value_array(i);
           ELSIF name_array(i) = 'hl' THEN
                hl := value_array(i);
           END IF;
      END LOOP;
      l_query := qu||'%';
      FOR x IN (
      select object_name, object_id from user_objects
      where upper(object_name) like upper(l_query) and upper(object_type) = upper(hl) order by 1 asc)
      LOOP
        l_list1 := l_List1 || l_separator || '"' || x.object_name || '"';
        l_list2 := l_List2 || l_separator || '"' || x.object_id || '"';
        l_separator := ',';
      END LOOP;
      owa_util.mime_header('text/html', false);
      owa_util.http_header_close;
      --htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
      htp.p('sendRPCDone(frameElement, "' || qu || '", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
    END;
    /2) grant EXECUTE rights to APEX_PUBLIC_USER (the user APEX uses to connect to the database) on the procedure
    grant execute on incsearch to apex_public_user;3) upload the ac.js file as static file to your application
    4) put the following javascript code in the HTML Header of your APEX page:
    <script src="#WORKSPACE_IMAGES#ac.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript">
    function iac()
    InstallAC(document.wwv_flow,document.getElementById('P1_X'),"","!MATTHIASH.incsearch","&P1_OBJECT_TYPE.");
    </script>In my example, P1_X is a text field and P1_OBJECT_TYPE is a dropdown list with all user object types.
    Good luck,
    Matthias Hoys

  • How to call stored procedure from postgresql to jsp

    i'm using a jdeveloper.. and i'm a newbie of jsp.. i just wanna know how to call a stored procedure in jsp?... This is my function in postgres and i don't know how to call it in jsp...
    SELECT * from SP_1('2006-01-11') as ( company_code char(5), branch_category char(5), branch_code char(15), day_sales numeric(19,2), month_to_date numeric(19,2), no_of_transaction int8, month_to_date_py numeric(19,2), year_to_date numeric(19,2), year_to_date_py numeric(19,2), remarks text, time_reported text );

    hi again.. i'm using jsp in jdeveloper, i just wanna know how to declare double in jsp because my module is report and i need to get the average daily sales = 4500/ no. of transaction = 3. This is my code.. Where will i put the code in declaring the double and the average daily sales? Thanks in advance..
    <%@ page contentType="text/html;charset=windows-1252" import="java.sql.*,Connect.CRMCon"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <%
    String ave = request.getParameter("ave_daily_sales");
    double cashsales = Double.parseDouble(ave);
    %>
    <%
    logparameters data = new logparameters();
    data.txtbox = request.getParameter("txtbox");
    %>
    <table cellspacing="3" cellpadding="2" border="1" width="100%">
    <tr>
    <td width="5%" bgcolor="#cccccc" height="29">
    <DIV align="center">Company Code</DIV>
    </td>
    <td width="4%" bgcolor="#cccccc" height="29">
    <DIV align="center">Branch Category</DIV>
    </td>
    <td width="6%" bgcolor="#cccccc" height="29">
    <DIV align="center">Branch Code</DIV>
    </td>
    <td width="8%" bgcolor="#cccccc" height="29">
    <DIV align="center">Day Sales</DIV>
    </td>
    <td width="9%" bgcolor="#cccccc" height="29">
    <DIV align="center">Month to Date</DIV>
    </td>
    <td width="5%" bgcolor="#cccccc" height="29">
    <DIV align="center">No.of Transaction</DIV>
    </td>
    <td width="9%" bgcolor="#cccccc" height="29">
    <DIV align="center">Month to Date(PY)</DIV>
    </td>
    <td width="9%" bgcolor="#cccccc" height="29">
    <DIV align="center">Ave.Daily Sales to Date</DIV>
    </td>
    <td width="9%" bgcolor="#cccccc" height="29">
    <DIV align="center">Year to Date</DIV>
    </td>
    <td width="9%" bgcolor="#cccccc" height="29">
    <DIV align="center">Year to Date(PY)</DIV>
    </td>
    <td width="9%" bgcolor="#cccccc" height="29">
    <DIV align="center">Remarks</DIV>
    </td>
    <td width="5%" bgcolor="#cccccc" height="29">
    <DIV align="center">Time Reported</DIV>
    </td>
    </tr>
    <%
    try
    CRMCon ccon = new CRMCon();
    Connection con = ccon.getConnection();
    String sql = "select * from sp_1('"+data.txtbox+"')";
    // String sql = "SELECT * from SP_1('"+ request.getParameter("data.txtbox")+"')" ;
    sql += " as (company_code char(5), branch_category char(5) ," ;
    sql += "branch_code char(15) , day_sales numeric(19,2)," ;
    sql += "month_to_date numeric(19,2), no_of_transaction int8," ;
    sql += "month_to_date_py numeric(19,2), year_to_date numeric(19,2)," ;
    sql += "year_to_date_py numeric(19,2), remarks text, time_reported text) " ;
    //out.println(sql);
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery(sql);
    while (rs.next())
    %>
    <tr>
    <td width="13%"> <%= rs.getString("company_code") %> </td>
    <td width="63%"> <%= rs.getString("branch_category") %> </td>
    <td width="24%"> <%= rs.getString("branch_code") %> </td>
    <td width="24%"> <%= rs.getString("day_sales") %> </td>
    <td width="24%"> <%= rs.getString("month_to_date") %> </td>
    <td width="24%"> <%= rs.getString("no_of_transaction") %> </td>
    <td width="24%"> <%= rs.getString("month_to_date_py") %> </td>
    <td width="24%"> <%= rs.getString("year_to_date") %> </td>
    <td width="24%"> <%= rs.getString("year_to_date_py") %> </td>
    <td width="24%"> <%= rs.getString("remarks") %> </td>
    <td width="24%"> <%= rs.getString("time_reported") %> </td>
    </tr>
    <%
    catch (Exception ex)
    out.println("Error:"+ex.getMessage());
    %>
    </table>
    </body>
    </html>
    <%!
    class logparameters
    public String txtbox;
    %>

  • Call Stored Procedure in ASP

    Failed to executed the stored procedure when i used the command object in ADO to call the packages' function!!!!
    the result is ---
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC driver for Oracle]Syntax error or access violation
    the connection is ok and i had retrieved the parameters' value, it's ok too...
    any tricky or hint about using command object to call stored pro???????
    thx!!!!!
    P.S. i am using oracle 8.0.5

    If you have account on Metalink.
    Please go there and do a search on ASP.
    There you can find, how to call SP from
    ASP.
    If you have problem finding this let
    me know.
    I will try to find it

  • HOW TO CALL STORED PROCEDURES IN JSP

    CAN ANY ONE SEND A SAMPLE CODE , HOW A STORED PROCEDURE CAN BE CALLED IN JSP
    THANKS
    SPUTNIK

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by any:
    Oreilly jdbc and java explain well.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection(url, "scott", "tiger");
    CallableStatement cs = con.prepareCall("EXECUTE storedprocedurename(?,?)");
    cs.setInt(1, cid);
    cs.registerOutParameter(2, java.sql.Types.VARCHAR);
    ResultSet rs = cs.executeQuery();
    while (rs.next())
    { %>
    <tr>
    <td> <%= rs.getString(2) %> </td> //<%= rs.getString("country_name") %>
    </tr><HR></BLOCKQUOTE>
    Hi ,i am not very sure whether the call execute in the prepare call statement works please try for CALL in the following way:
    con.prepareCall("{call storedProcedurename(?,?)}");

  • How to call stored procedure in data services?

    Hi, all,
    I'm a newbie and am trying to evaluate Flex for our
    development environment. We use a lot of Oracle stored packages in
    the database to process the business logic. However, I can't seem
    to find a good example to call a stored procedure in flex data
    services.
    Here is a part of my data-management-config.xml:
    <destination id="oracle2">
    <adapter ref="java-dao" />
    <properties>
    <use-transactions>true</use-transactions>
    <source>flex.data.assemblers.SQLAssembler</source>
    <scope>application</scope>
    <metadata>
    <identity property="GKEY"/>
    </metadata>
    <network>
    <session-timeout>20</session-timeout>
    <paging enabled="false" pageSize="10" />
    <throttle-inbound policy="ERROR" max-frequency="500"/>
    <throttle-outbound policy="REPLACE"
    max-frequency="500"/>
    </network>
    <server>
    <database>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <url>jdbc:oracle:thin:xxxxxxxxxxx:1521/racdev</url>
    <login-timeout>15</login-timeout>
    </database>
    <actionscript-class>History</actionscript-class>
    <fill>
    <name>by_nbr</name>
    <sql>select to_char(POSTED,'dd-Mon-yyyy hh:mi:ssAM')
    POSTED, GKEY, EQUSE_GKEY,WTASK_ID,VSL_ID,VOY_NBR,STATUS from
    equipment_history where eq_nbr = #sNbr# order by posted
    desc</sql>
    </fill></server>
    </properties>
    </destination>
    How do I call a stored procedure named
    pk_equipment_history.get(eq_nbr varchar2, o_resultset out
    sys_refcursor) in place of the sql select in the above file? The
    o_resultset output parameter will return exactly the same result as
    the sql. How do I bind the output parameter?
    TIA

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

  • How to call stored procedure having parameter as oracle type from java???

    Hello,
    I have created following type & stored procedure in oracle. How can i call this stored procedure from my java class?
    I want to pass 2d array to this procedure.
    CREATE OR REPLACE TYPE type_survey AS OBJECT ( emp_id number,emp_name varchar(100));
    CREATE OR REPLACE TYPE tbl_survey AS VARRAY(100) OF type_survey;
    CREATE OR REPLACE PROCEDURE INSERTEMP (pp in tbl_survey)
    IS
    BEGIN
    FOR I IN pp.FIRST .. pp.LAST
    LOOP
    INSERT INTO SURVEY (id) VALUES (pp(I).emp_id);
    END LOOP;
    END;
    /

    CREATE OR REPLACE TYPE type_survey AS OBJECT ( emp_id number,emp_name varchar(100));
    CREATE OR REPLACE TYPE tbl_survey AS VARRAY(100) OF type_survey;
    CREATE OR REPLACE PROCEDURE APP_DATA.INSERTEMP (pp in tbl_survey,result out varchar)
    IS
    BEGIN
    FOR I IN pp.FIRST .. pp.LAST
    LOOP
    INSERT INTO SURVEY (id) VALUES (pp(I).emp_id);
    END LOOP;
    result:='done';
    END;
    public static void passArray() throws SQLException
         Connection conn=null;
         try{
              conn=getOracleConnection();//this method returns connection object
         catch (Exception e)      
              e.printStackTrace();
         String[][] val=new String[2][2];
    *     val[0][0]="1";*
    *     val[0][1]="aaa";*
    *     val[1][0]="2";*
    *     val[1][0]="bbb";*
    StructDescriptor desc1=StructDescriptor.createDescriptor("TYPE_SURVEY",conn);
    STRUCT p1struct1 = new STRUCT(desc1,conn,_val_); *//showing error at this line*
    ArrayDescriptor arraydesc = ArrayDescriptor.createDescriptor("TBL_SURVEY",conn);
    ARRAY array = new ARRAY(arraydesc,conn,*p1struct1*);
    CallableStatement cstmt = conn.prepareCall("{ call INSERTEMP(?,?)}");
    cstmt.setObject(1,array);
    cstmt.registerOutParameter(2, OracleTypes.VARCHAR);
    cstmt.execute();
    String res=cstmt.getString(2);
    System.out.println(res);
    in the above java code, I have passed 2d array of string to STRUCT constructor and passed STRUCT object i.e. p1struct1  to ARRAY constructor. is it correct? that means @bottom line, I want to pass val array to my stored porcedure. How can i do this? above code is showing following error......
    Exception in thread "main" java.sql.SQLException: Fail to convert to internal representation: [Ljava.lang.String;@146c1d4
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.oracore.OracleTypeNUMBER.toNUMBER(OracleTypeNUMBER.java:540)
         at oracle.jdbc.oracore.OracleTypeNUMBER.toDatum(OracleTypeNUMBER.java:54)
         at oracle.sql.StructDescriptor.toOracleArray(StructDescriptor.java:717)
         at oracle.sql.StructDescriptor.toArray(StructDescriptor.java:1375)
         at oracle.sql.STRUCT.<init>(STRUCT.java:159)
         at com.flologic.ArrayDemo.passArray(ArrayDemo.java:29)
         at com.flologic.ArrayDemo.main(ArrayDemo.java:57)

Maybe you are looking for

  • Pages Won't Delete or Open Documents in iPhone 5

    I have the Pages App on my iPhone. Haven't use it in over year. Launched it. Found two documents I no longer need. Went to edit to delete. Held down one documents  I wanted to delete started to jiggle, but the trash can did not turn from ghost to ali

  • Hyperion planning user

    Hi, I created an Essbase shared services user with access rights on roles as follows: ROLE ACCESS GIVEN ASP 9.3.1 server -> Filter Administrator + Provisioning manager Analytic server Administrator + Provisioning manager RDBMS server Administrator Hy

  • JAAS - EJB

    Hello, In my system I going to implement JAAS, all informations about users, groups (every user is join to many groups - group in my system is like role) are stored in protection system (outside system provided by other vendor). I implements LoginMod

  • [nQSError: 46036] Internal Assertion:  error

    Hi I am a new bie to OBIEE, I am trying to create a simple example ... I use two tables product and product_stock noth from different schema..... the structure of the tables are as follows PRODUCT_STOCK INT_PRODUCT_ID     NUMBER(10)                  

  • How do I delete all junk without opening?

    My junk folder has 5 or 6 items in it. Since they are junk, I don't want to open them, I just want to get rid of them. How do I do that?