How to Run Stored Procedures from Teststand

I am trying to get teststand to run an SQL stored procedure but I always get the following error
Error executing substep 'Post'.
The following SQL command failed: 'EXECUTE cdt_st_test...'
Native error code -2147217900 0x80040e14
Microsoft OLE DB Provider for SQL Server:
Syntax error or access violation
It is a test stored procedure that doesn't pass any parameters.
Which steps must I use and how do I pass parameters.

I have sussed it now. I was setting the "Command Type" to stored procedure instead of default. I changed it back and did "EXECUTE cdt_st_test" and it works. I have also added the parameters there as well.

Similar Messages

  • 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 edit stored procedure from sqlplus ?

    Hi,
    Can anyone advise how to edit stored procedure from sqlplus ?
    Many thanks.

    You can get the source for an object from SQL*Plus by querying the user_source table, i.e.
    SQL> create procedure foo
      2  as
      3  begin
      4    dbms_output.put_line( 'foo' );
      5  end;
      6  /
    Procedure created.
    SQL> select text
      2    from user_source
      3   where name = 'FOO'
      4   order by line;
    TEXT
    procedure foo
    as
    begin
      dbms_output.put_line( 'foo' );
    end;Most commonly, though, if you are using SQL*Plus and a text editor to develop stored procedures, you will have all your stored procedures in .sql files that you edit and just use SQL*Plus to create (or recreate) the stored procedures.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to use stored procedures in TestStand

    I am trying to run a stored procedure but always get the error:
    Error executing substep 'Post'.
    The following SQL command failed: 'EXEC dbo.sp_test...'
    Native error code -2147217887 0x80040e21
    Microsoft OLE DB Provider for SQL Server:
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

    NI_jc,
    > I am trying to run a stored procedure but always get the error:
    >
    > Error executing substep 'Post'.
    > The following SQL command failed: 'EXEC dbo.sp_test...'
    > Native error code -2147217887 0x80040e21
    > Microsoft OLE DB Provider for SQL Server:
    > Multiple-step OLE DB operation generated errors. Check each OLE DB
    > status value, if available. No work was done.
    In my dealings with TestStand and SQL, such errors are ~usually~ related to
    either security permissions or the parameters passed to the stored
    procedure.
    Can you successfully run the stored procedure from SQL Query Analyzer using
    the same username and password (and other connection info) that you use in
    the DataLink used in TestStand?
    If so, I would then look at the parameters you are passin
    g to the stored
    procedure. Verify you are passing the correct number and correct data types
    for each parameter the stored proc expects.
    If that all checks out, double check that you are using the correct
    connection handle, etc.
    Good luck,
    Bob

  • Running stored procedures from HTML DB

    Hello.
    Is it possible to run stored procedures/functions from HTML DB? If yes, how to do it?
    Davide

    If the variable v_return_amount is a number, how can you assign a boolean to it? Are you sure your function is valid? I would write it slightly different:
    CREATE OR REPLACE FUNCTION verify_amount (
    v_invoices_pk IN NUMBER,
    v_new_amount IN NUMBER
    RETURN BOOLEAN
    IS
    CURSOR c_amount
    IS
    SELECT amount
    FROM invoices
    WHERE invoices.invoices_pk = v_invoices_pk;
    CURSOR c_dist_amount
    IS
    SELECT SUM (cost_distribution.amount)
    FROM cost_distribution
    WHERE cost_distribution.invoices_pk = v_invoices_pk;
    v_sum_amount NUMBER;
    v_invoices_amount NUMBER;
    BEGIN
    OPEN c_dist_amount;
    FETCH c_dist_amount
    INTO v_sum_amount;
    CLOSE c_dist_amount;
    OPEN c_amount;
    FETCH c_amount
    INTO v_invoices_amount;
    CLOSE c_amount;
    IF (v_invoices_amount <= v_sum_amount + v_new_amount)
    THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    RETURN v_return_amount;
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN FALSE;
    END;
    Other than that, I am not sure about your cursors but I can't judge from here. The other thing is how you use the function in the validation process. Can you try to correct and tell if it worked out?
    Denes Kubicek

  • Execute stored procedure from TestStand

    I am having difficulty executing a stored procedure from the TestStand Database step types.  I am using the "Data Operation" step type to set the input parameter, but I still get the following error;
    Procedure or function 'sproc_prior step' expects parameter '@serial_number', which was not supplied.
    I've attached the sequence file for review.
    Any help would be appreciated.
    Attachments:
    db Stored Procedure1.seq ‏9 KB

    We were able to fix this sequence by making the following changes:
    1.) In the Open SQL Statement change the Command Type to Stored Procedure instead of Default.
    2.) On the Get Results step change the Operation to Get - Retrieve Values from Record instead of Close since the Close SQL Statement takes care of that for you.
    3.) Also change the Record To Operate On to Current - Use Current Record.
    After making these changes the sequence should work.  Also note, that it would be preferable to change the stored procedure name to us all underscores and not spaces since this is more standard for use with databases.
    John B.
    Applications Engineer
    National Instruments

  • 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

  • Running stored procedure from unix shell

    Hi
    I have a stored procedure proc1 stored in a file, code1.txt in my home directory /home/user. How do i execute this file which contains the stored procedure from unix shell? I would really appreciate it if somebody gives me the complete shell script to accomplish the above task.
    Thanks.

    To put everything together into a single posting:
    The EXEC command is a SQL*Plus macro command. It is not a SQL or PL/SQL command.
    The only way to execute a stored proc from a client, is to wrap the call in an anonymous PL/SQL block. I.e you need a BEGIN and END PL/SQL wrapper around the call.
    E.g.BEGIN
      -- calling a stored proc to start leave processing
      scott.StartLeaveProcessing;
    END;The EXEC macro in SQL*Plus does this automatically for you. Thus less typing. But do not confuse this command with the PL/SQL language.
    Second issue. Use bind variables when making calls from clients. And not just for SQL statements, but also for PL/SQL. Unfortuantely this tends to be a hack in SQL*Plus due to the way SQL*Plus itself treats its bind variable assignments. But in principle, this is what you should do when calling an Oracle stored proc from a client:
    SQL> -- define a host variable
    SQL> var EMPID varchar2(100)
    SQL> var FROM_DEPT number
    SQL> var TO_DEDPT number;
    SQL>
    SQL> -- assign values to these (this is where SQL*Plus hacks it)
    SQL> exec :EMPID := 100;
    SQL> exec :FROM_DEPT := 1;
    SQL> exec :TO_DEPT := 2;
    SQL>
    SQL> -- now make the stored proc call for moving employee 100 from
    SQL> -- department 1 to department 2
    SQL> EXEC scott.EmployeeTransfer( :EMPID, :FROM_DEPT, :TO_DEPT );
    SQL>To do this from a Unix shell script:
    #!/bin/bash
    # environment variables
    # --> put environment such as ORACLE_HOME, ORACLE_SID, TWO_TASK
    # etc. here <--
    # redirect STDIN from TTY (keyboard typewriter device) to the input from
    # this file - which means SQL*Plus will not read from the keyboard but read
    # from this file its input until the EOF marker/text is encountered
    sqlplus -s /nolog << EOF
    connect scott/tiger
    var EMPID varchar2(100)
    var FROM_DEPT number
    var TO_DEDPT number;
    exec :EMPID := 100;
    exec :FROM_DEPT := 1;
    exec :TO_DEPT := 2;
    exec scott.EmployeeTransfer( :EMPID, :FROM_DEPT, :TO_DEPT );
    exit;
    EOF
    #eof

  • XSQL: how to invoke stored procedure from XSQL

    Any one has example on how to invoke stored procedure within XSQL with associated *.xsl? What the syntax looks like? Thanks.

    If you want to simply invoke a stored procedure, use:
    <xsql:dml>
    begin
    proc(args);
    end;
    </xsql:dml>
    If you want to return XML that your stored procedure "prints" to the OWA page buffer, then use:
    <xsql:include-owa>
    If you want to invoke a stored function that returns a REF CURSOR function, then use <xsql:ref-cursor-function>
    null

  • How to run stored procedure in DOS command line????

    Hi,
    I want to run a stored procedure in DOS command line?
    (My_Stored_Procedure is the stored procedure that I want to run )
    This is what I did in DOS prompt
    C:\>sqlplus scott/tiger exec lMy_Stored_Procedure <Return>
    Obviously it is NOT working. Please send me the correct way to fix this.
    Thanks so much in advance for helping.
    Cuong

    Billy  Verreynne  wrote:
    BluShadow wrote:
    True Billy, but even Windows hasn't completely got away from using the "DOS" word...Yeah - the command line/shell environment is based on that of the old DOS command interpreter. But Microsoft does not make the mistake of call it DOS.
    In fact, with earlier versions of Windows NT, a 16bit DOS real-mode virtual machine was supported. This was very kewl.
    Running a large BBS with multiple nodes back then required a DOS machine per node, an IPX network, and a Novell file server.Novell Netwars. ;)
    Ahhhh! good old DOS... so many good programs written at that low level, outside the Windoze environment.Yeah.. cut my teeth on writing code for DOS. Still have all my old BIOS and assembler manuals for it. Wrote my own screen s/w (write to a buffer and then move it into the video buffer, instead of writing char wise to the video buffer via interrupts), mucking about with my own concurrent threading model (using very simplistic cooperative multitasking) and so on. Heck, wrote tons of s/w on DOS... :-)Yeah I've still got a copy of my old machine code programs for writing to buffers and screen memory switching for smooth animation. Run them nowadays and they run like sh!t off a shovel. And all my old coursework including writing an interpreted language and multi-window (dos based windows) editor, parser and the code to execute the language and display the output. Oooo, and so much other stuff.
    Awesome back then as you got really intimate with the o/s and hardware. This is sorely lacking today in environments like Java. And I think the reason why so much code written today is less than optimal - to put it kindly.Exactly. Started for me on the Sinclair zx81 (writing Basic), then the Sinclair Spectrum (Basic and Assembly), then Sinclair QL (yes I really had one!) and then the BBC Master 128K (where I got to writing my own rom filing system and creating my own eproms, to integrate with the word processor for additional printing features etc. as well as storing games on rom for speedy loading - and I still have it and it still works!)
    It's that level of working with the underlying memory and assembly language that gives you the understanding of how values are passed between code using the stack and registers, and how memory allocation and referencing is done etc. As you say... it's missed in a lot of todays teaching, which just seems too high level and misses the basic concepts of things such as datatypes and why they are different. I bet half the modern programmers wouldn't have a clue how to do multiplication or division of binary numbers using the carry flag.

  • 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.

  • Running Stored procedures from Forms

    I have several stored procedures (stored in the database) that I
    want to run from Forms (client), but when they're running my
    application (in Forms) is frozen until the procedure end.
    I don't know how to run that stored without lock the application,
    somebody Can Help me???
    THANKS
    null

    The second parameter of the DBMS_JOB.SUBMIT procedure needs to be
    a valid PL/SQL call, i.e. it must at least be terminated by a
    semicolon. You could also wrap it into an anonymous PL/SQL block,
    like: 'BEGIN SP_CREA_FACTURAS_PADRE; END;'
    Marisol (guest) wrote:
    : Dietmar:
    : I put this code in my application and I didn't get any response
    : DBMS_JOB.SUBMIT( iJobNumber,
    : 'SP_CREA_FACTURAS_PADRE',
    : SYSDATE,
    : 'null',
    : FALSE);
    : COMMIT;
    : When I select the option that executes this code my application
    : ends without any message...
    : You know why is this happen?
    : How can I resolve??
    : Thanks :)
    null

  • How to run stored procedure in run-time not in design

    hello:
    I have download the ODT software
    and i installed VS 2003 environment
    amd i have oracle 9i on the server and oralce client on my computer
    and I know how to run the ODT inside the VS2003 and how to use it
    I built a package and inside it a procedure that does not take any parameter
    PROCEDURE "TEST1" IS
    BEGIN
    insert into emp (empno,ename)
    values (3003,'jon');
    END "TEST1";
    this procedure is valid and I can run it in ODT (by right click over the procedure name and select "Run")
    but when I drag it and drop this procedure on a form in application I have a dialog with errors that's not understandable
    for example:
    ORA-06550: line 1, column 27
    PLS-00315: PL/SQL TABLE Declarations must currently use binary_integer indexes
    and many other errors
    ok I want to know how I can call the procedure in the code and give to it the in parameters and then get the out parameters
    I hope to find replay
    thank you

    Hi,
    You have to take care of certain measures other thatn just drag and drop the Oracle procedure to the .NET form.
    Following is a simple code to call an Oracle procedure from the C#.Net form
    ============================================================
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace TEST1
         public class CallingProcs : System.Web.UI.Page
              protected System.Web.UI.WebControls.Button Button1;
              protected System.Web.UI.WebControls.TextBox txtYear;
              OracleConnection conn;
              private void Page_Load(object sender, System.EventArgs e)
                   // Put user code to initialize the page here
                   string oradb = "Data Source=ORA1;User Id=SCOTT;Password=TIGER;";
    conn = new OracleConnection(oradb);
                   conn.Open();
              #region Web Form Designer generated code
              override protected void OnInit(EventArgs e)
                   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
                   InitializeComponent();
                   base.OnInit(e);
              /// <summary>
              /// Required method for Designer support - do not modify
              /// the contents of this method with the code editor.
              /// </summary>
              private void InitializeComponent()
                   this.Button1.Click += new System.EventHandler(this.Button1_Click);
                   this.Load += new System.EventHandler(this.Page_Load);
              #endregion
              private void Button1_Click(object sender, System.EventArgs e)
                   //OracleCommand dbcmd = new OracleCommand();
                   OracleCommand dbcmd = conn.CreateCommand ();
                   dbcmd.CommandType = CommandType.StoredProcedure;
                   dbcmd.CommandText = "TEST1";
                   try
                        dbcmd.ExecuteNonQuery ();
                        Response.Write("Excecuted succesfully");
                   catch(Exception ex)
                        Response.Write(ex.Message);
    ============================================================
    Most of the above code is generated automatically. I am using Visual Studio .NET 2003 , C# for it.
    The design view of the form contains a button named 'Button1' and the code is aimed to call the procedure 'TEST1' on clicking the button.
    Hope this will give you a start to using oracle from .NET

  • 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;
    %>

Maybe you are looking for

  • Oracle XML DOM parser - attribute values are not printing on the screen ??

    Hi Everyone, I am just trying to use oracle DOM parser to paerse one of my xml file, java file can be compiled and run agianst a xml file, But I cannot see any attribute values printing on the screen.. Appreciate if anyone can help, where I have gone

  • ACH Format

    We are using PMW for creating payroll ACH. It works fine but when we go and see it in al11 instead of spaces file has "#" characters. if we download using FDTA  file looks good. need help for the problem, if you have experienced this before.

  • Dot1x port authentication configuration

    Hello Friends, I am working on dot1x configuration deployment project and wanted to clear one confusion, I am having simple setup in which after authentication, workstation should go to vlan decided by ACS and after failed authenticatio, workstation

  • Flash Questions And help

    Okay, firstly I havent used flash in a while, and now, when i come to use actions i cant get the option for suggestions of what can actually be used. Eg im typing goto and it would give me a list of options like gotoAndPlay and AndStop, now its not d

  • Dba_data_files.increment_by: what kind of units?

    I'm confused about the result in the 'increment_by' column in dba_data_files. Can anyone tell me what units are used here? (below is what I did. I would expect a value of 16M/32M or something related...) CREATE TABLESPACE sushi_data DATAFILE 'f:\data