How to execute a stored procedure with an out parameter ?

Guys I am struggling with executing a stored procedure from sql plus.I mean my stored procedure has 2 input parameter and 1 out put parameter (status of the execution).
MY_PROCEDURE(p_name in varchar2,p_age in number,p_status out varchar2)
end my_procedure;
When I say
EXECUTE MY_PROCEDURE('manohar','Shetty');
i get insufficient parameters errors.
please help.

EXECUTE isn't a valid PL/SQL construct. It's a SQL*Plus command. You don't want to put any SQL*Plus commands in a PL/SQL block.
You can always execute a stored procedure purely through PL/SQL
begin
  my_stored_procedure( x, y, z );
end;SQL*Plus happens to give you the execute command so you can avoid the begin and end statements.
Justin

Similar Messages

  • How to execute plsql stored procedure with DbAccess

    sessionInfo object can give DbAccess .through
    which u can use javax.infobus.DbAccess API to
    execute sql satement and stored procedures according to infobus API .iam able to
    execute simple query by using executeCommand() ,executeRetrival() ?. how to execute stored procedures with executeRetrieval() .
    how to take in and out parameters
    suggestions are welcome
    waiting for your suggestions

    I am also looking for the same.
    Did you get any info on this
    Thanks,
    jagan
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by chandra sekhar ([email protected]):
    sessionInfo object can give DbAccess .through
    which u can use javax.infobus.DbAccess API to
    execute sql satement and stored procedures according to infobus API .iam able to
    execute simple query by using executeCommand() ,executeRetrival() ?. how to execute stored procedures with executeRetrieval() .
    how to take in and out parameters
    suggestions are welcome
    waiting for your suggestions<HR></BLOCKQUOTE>
    null

  • How to call a stored procedure which has out parameter value

    my code is
    public Connection createConnection() {
                   Connection conn = null;
                        try {
                             Class.forName(DRIVER);
                             conn = DriverManager.getConnection(URL,USER,PASS);
                        } catch (ClassNotFoundException cnfe) {
                             System.err.print("Class not found");
                        } catch (SQLException sqle) {
                             System.err.print("SQLException");
                   return conn;
         public static void main(String args[]){
              StroedProcedure stp = new StroedProcedure();
              Connection con = stp.createConnection();
              try {
                   CallableStatement stproc_stmt = con.prepareCall("{call Account_Summary(?,?,?,?,?,?,?,?)}");
                   stproc_stmt.setString(1, "123456");
                   stproc_stmt.setDate(2, null);
                   stproc_stmt.setString(3, null);
                   stproc_stmt.setString(4, null);
                   stproc_stmt.setString(5, null);
                   stproc_stmt.setString(6, null);
                   stproc_stmt.setDate(7, null);
                   stproc_stmt.setDate(8, null);
                   stproc_stmt.registerOutParameter(1,Types.CHAR);
                   stproc_stmt.registerOutParameter(2,Types.DATE);
                   stproc_stmt.registerOutParameter(3,Types.CHAR);
                   stproc_stmt.registerOutParameter(4,Types.CHAR);
                   stproc_stmt.registerOutParameter(5,Types.CHAR);
                   stproc_stmt.registerOutParameter(6,Types.CHAR);
                   stproc_stmt.registerOutParameter(7,Types.DATE);
                   stproc_stmt.registerOutParameter(8,Types.DATE);
                   stproc_stmt.execute();
                   System.out.println("test "+stproc_stmt.getString(1));
                   ResultSet rs = stproc_stmt.executeQuery();
                  while (rs.next()){
                       System.out.println("result "+rs.getString("ACCPK"));
              } catch (SQLException e) {
                        e.printStackTrace();
         }And the stored procedure is
    CREATE OR REPLACE
    procedure Account_Summary (accpk in out char, incdt out date, bcur out char, bmark out char, tarTE out char, numHold out char, stDt out date, AsDt out date)
    is
    begin
    select account_pk, inception_date, base_currency, benchmark  into accpk, incdt, bcur, bmark
    from account a
    where a.Account_pk=accpk;
    select target_te, number_holdings, start_date, as_date into tarTE, numHold, StDt, AsDt
    from acc_summary asum
    where asum.account_pk=accpk;
    end Account_Summary;but it gives a exception ORA-01460: unimplemented or unreasonable conversion requested
    ORA-06512: at "REPRO.ACCOUNT_SUMMARY", line 4
    ORA-06512: at line 1
    i want to execute a stored procedure which has in , inout or out parameter
    but it can not work

    ========================
    In some contects varchar2 variable limit is 32512 characters... October 16, 2003
    Reviewer: Piotr Jarmuz from Poznan, Poland
    Interesting to note is the fact that varchar2 variables as parameters to stored
    procedures (in in/out out) may be "only" 32512 bytes long.
    I've checked this in Java and Perl. 32512 is the last value that works, for any
    bigger it throws:
    Exception in thread "main" java.sql.SQLException: ORA-01460: unimplemented or
    unreasonable conversion requested
    But in PL/SQL as you said 32767
    Regards,
    Piotr
    =================================
    This i got it from ask tom, well it make sense.... try checking your input with small numbers and strings
    Have fun

  • How to call a oracle procedure with in/out parameter frm unix shell script?

    Hi,
    I need to call an oracle stored procedure from unix script. The procedure has 1 input parameter and 2 output parameter. Please send me the syntax for the same. Based on the output values of procedure, I have to execute some more commands in unix script.
    Thanks and regards
    A

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • Stored Procedure with in out parameter of table of records type

    Hi
    I am tring to create a strore procedure inside a package like this:
    procedure name_p(root in table.column%type, tab in out table_of_records_type);
    I get the error:
    PLS-00306: Wrong number or types of arguments in call to 'name_p'
    I am working with oracle 8.1.7.
    I dont really understand why this is happening.
    Can anyone suggest anything.
    Thnx
    Ed

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • How to execute oracle stored procedure through php as externally?

    hi...
    i am searching for the way that how to execute oracle stored procedure through web service, i am using php and mysql, i have some stored procedures in oracale database, i want to execute them, from php, means the database will be remain mysql, and the stored procedures of oracle will be executed externally...
    Kind regards,
    Wilayat.

    Ok, so first of all this is a kind of strange question. Since Oracle and MYSQL can happily live side by side.
    Make sure you have the oracle client (instant or regular ) installed and OCI_8 is set up and working correctly in PHP. If it is, when you run the phpinfo() routine you will see oci_8 on there. IF PHP connects just fine from the command line yet apache wont connect check permissions and things like the LD_Library Path.
    Then in php, right along with your MySQL statements run Oracle Statements eg:
    <?php
    $OraDB = oci_connect(name,pass,tnsname);
    $MySQLdb = mysql_connect([parms]);
    $oraQueryText = "begin sp_some_proc([some parms]); end;" ;
    $mysqlQuery = " Some mysql Query";
    $oraQuery = oci_parse($OraDB,$oraQueryText );
    oci_execute($oraQuery);
    mysql_execute([parms]);
    ?>
    Use the standard fetch code to get data from either of them.
    If you cannot and I mean absolutely cannot get an admin to link in OCI_8 then you still have recourse although it will be tedious as hell. PHP allows you to exec calls to the OS. You still MUST make sure the Oracle Client is installed and that sqlplus runs from the command line. You will more then likely have to have a shell script written to do this as well, but maybe not as I have never tried it with the exception of capturing the return value of sqlplus and you will have to dig into sqlplus to get it to send its results to a file you can then parse with php.
    Good Luck!

  • How to execute a stored procedure/function in TOAD?

    Hi, All ,
    Can someone please tell me how to execute a stored procedure/function in TOAD?
    I have tired
    EXECUTE PROCEDURENAME(888), but it doesn’t work.
    TOAD give me the error: invalid SQL statement.
    Thanks a lot

    Write PL/SQl block.
    i.e Begin
    Procedure name..
    end;
    Then it will be excuted.
    Ashutosh

  • How to execute a stored procedure every 5 minutes in biztalk admin console

    Hi 
    how to execute a stored procedure every 5 minutes in biztalk admin console without using biztalk orchestration
    we need to update table data every 5minutes 
    please replay asap...........
    thanks advance....

    WCF adapter is best suited for the same. Use ‘Template’ feature of WCF adapter. Template is mainly used to add wrapper elements around the body of the outgoing message from send port.
    Below mentioned post is perfectly suited for you.
    http://social.technet.microsoft.com/wiki/contents/articles/19845.invoke-a-sql-stored-procedure-on-the-biztalk-wcf-send-port-without-needing-an-orchestration.aspx
    Regards,
    Rachit
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to change stored procedure with Table Valued Parameter

    I am not sure how to change the normal stored procedure with Table Value Parameter.Do I have to create a separate Table or do I have to create a datatype. Can you please help me with this
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF]
    @dp_id char(32),
    @dv_id char(32),
    @em_number char(12),
    @email varchar(50),
    @emergency_relation char(32),
    @option1 char(16),
    @status char(20),
    @em_id char(35),
    @em_title varchar(64),
    @date_hired datetime
    AS
    BEGIN
    SET NOCOUNT ON;
    MERGE [dbo].[em] AS [Targ]
    USING (VALUES (@dp_id, @dv_id , @em_number, @email, @emergency_relation, @option1, @status, @em_id, @em_title, @date_hired))
    AS [Sourc] (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired)
    ON [Targ].em_id = [Sourc].em_id
    WHEN MATCHED THEN
    UPDATE
    SET dp_id = [Sourc].dp_id,
    dv_id = [Sourc].dv_id,
    em_number = [Sourc].em_number,
    email = [Sourc].email,
    emergency_relation = [Sourc].emergency_relation,
    option1 = [Sourc].option1,
    status = [Sourc].status,
    em_title = [Sourc].em_title,
    date_hired = [Sourc].date_hired
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (dp_id, dv_id, em_number, email, emergency_relation, option1, status, em_id, em_title,date_hired)
    VALUES ([Sourc].dp_id, [Sourc].dv_id, [Sourc].em_number, [Sourc].email, [Sourc].emergency_relation, [Sourc].option1, [Sourc].status, [Sourc].em_id, [Sourc].em_title, [Sourc].date_hired);
    END;

    It's not clear how you would change the procedure. But assuming that you want to replace the existing scalar parameters with tabular input, this is how you would do it. You first create a table type:
    CREATE TYPE  Insertor_type AS TABLE
        (dp_id                char(32),
         dv_id                char(32),
        em_number            char(12),
        email                varchar(50),
        emergency_relation   char(32),
        option1              char(16),
        status               char(20),
        em_id                char(35),
        em_title             varchar(64),
        date_hired           datetime)
    Then you change the procedure header:
    ALTER PROCEDURE [dbo].[uspInsertorUpdateINF] @tvp Insertor_type READONLY AS
    And finally you change the USING clause:
       USING (SELECT dp_id, dv_id , em_number, email, emergency_relation, option1, status, em_id, em_title, date_hired
              FROM   @tvp) AS [Sourc] ON [Targ].em_id = [Sourc].em_id
    The rest is fine as it is.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to execute an Stored procedure in SQLDeveloper?

    Hi
    Thank you for reading my post
    I want to know how i can execute an Stored procedure in SQL developer 1.1.0.21
    for example those sotred procedure from HR schema.
    one of them is add_job_history
    when i click on it and select run i see a new dialog with some sql as follow:
    DECLARE
      P_EMP_ID NUMBER;
      P_START_DATE DATE;
      P_END_DATE DATE;
      P_JOB_ID VARCHAR2(10);
      P_DEPARTMENT_ID NUMBER;
    BEGIN
      P_EMP_ID := NULL;
      P_START_DATE := NULL;
      P_END_DATE := NULL;
      P_JOB_ID := NULL;
      P_DEPARTMENT_ID := NULL;
      HR.ADD_JOB_HISTORY(
        P_EMP_ID => P_EMP_ID,
        P_START_DATE => P_START_DATE,
        P_END_DATE => P_END_DATE,
        P_JOB_ID => P_JOB_ID,
        P_DEPARTMENT_ID => P_DEPARTMENT_ID
    END;I checked the help and it said i should replace =>P_emp_id with some number
    I did that and i get error.
    can some one give me a sample for executing this procedure?
    thanks

    Remove the NULL values with the data you want to use in the SP.
    BEGIN
    P_EMP_ID := 32;
    P_JOB_ID := 'boss';
    For the date you have to chose the approriate string....

  • Executing a Stored Procedure with OUT Variables

    When you execute a stored proc withi OUT variables, do you have to add in the "Declare" section and "Begin/End" sections? Or can you just use "EXECUTE <stored proc>"??

    When you execute a stored proc withi OUT variables, do you have to add in the "Declare" section and "Begin/End" sections?
    Or can you just use "EXECUTE <stored proc>"?? You mean this?:
    michaels>  create or replace procedure p (o out varchar2)
    as
    begin
       o := 'Some out variable';
    end p;
    Procedure created.
    michaels>  var o varchar2(50)
    michaels>  exec p(:o)
    PL/SQL procedure successfully completed.
    michaels>  print o
    o                                                
    Some out variable                                

  • How to execute MYSQL stored procedure  using java

    Hello friend
    I am very new to MYSQL stored procedure how to call external stored procedure , from where i got good tutorials about MYSQL stored procedure and JAVA

    If you need help with MYSQL or stored procedures this is not the place. If you need help with JDBC:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html

  • Executing the stored procedure with output which is a collection of objects

    Hello,
    I have the objects and collection of objects within an objects as below:
    CREATE OR REPLACE TYPE SHARE_OUTST_T
    AS OBJECT
    SHR_OUTST_AMT     number
    CREATE OR REPLACE TYPE SECURITY_T
    AS OBJECT
         VOTE_PER_SHR     number
    , CUSIP     varchar2(12)
    , EXCHANGE     varchar2(10)
    , IV_TYPE_CD     varchar2(10)
    , SEC_TICKER_SYMB     varchar2(20)
    CREATE OR REPLACE TYPE ALTERNATE_ID_T
    AS OBJECT
    ( ALT_ID_TYPE     varchar2(20)
    CREATE OR REPLACE TYPE ISSUE_MAINT_VERSION_T
    AS OBJECT
         IM_KEY_ID number     
    ,     IM_VER_NUM number
    ,     EFF_TMSTMP timestamp
    , EXP_TMSTMP timestamp
    ,     NEXT_REVIEW_TMSTMP timestamp
    ,     APPR_STATUS_REF_ID number
    , VOTE number
    , ADD_USR_ID varchar2(20)
    , ADD_TMSTMP timestamp
    , UPD_USR_ID varchar2(20)
    , UPD_TMSTMP timestamp
    , LOCK_LEVEL_NUM number
    , ACTION VARCHAR2(1)
    CREATE OR REPLACE TYPE ISSUE_SHARE_MAINT_T
    AS OBJECT
         IM_KEY_ID      number     
    ,     IM_VER_NUM      number
    ,     SHR_OUTST_AMT      number
    ,     CURR_OUTST_AMT     number
    ,      ADD_USR_ID      varchar2(20)
    ,      ADD_TMSTMP      timestamp
    ,      UPD_USR_ID      varchar2(20)
    ,      UPD_TMSTMP      timestamp
    ,      LOCK_LEVEL_NUM      number
    ,     ACTION     VARCHAR2(1)
    CREATE OR REPLACE TYPE ISSUE_MAINT_COMMENT_T
    AS OBJECT
         IM_KEY_ID      number     
    ,     IM_VER_NUM      number
    ,     COMMENT_TXT     varchar2(400)
    ,      ADD_USR_ID      varchar2(20)
    ,      ADD_TMSTMP      timestamp
    ,      UPD_USR_ID      varchar2(20)
    ,      UPD_TMSTMP      timestamp
    ,      LOCK_LEVEL_NUM      number
    ,     ACTION     VARCHAR2(1)
    CREATE OR REPLACE TYPE ISSUE_MAINT_COMMENT_COL_T AS TABLE OF ISSUE_MAINT_COMMENT_T;
    CREATE OR REPLACE TYPE ISSUE_VERSION_T
    AS OBJECT
         SHARE_OUTST     SHARE_OUTST_T
    ,     SECURITY     SECURITY_T
    ,     ALTERNATE_ID     ALTERNATE_ID_T
    ,     ISSUER     ISSUER_T
    ,     ISSUE_MAINT_VERSION     ISSUE_MAINT_VERSION_T
    ,     ISSUE_SHARE_MAINT     ISSUE_SHARE_MAINT_T
    , ISSUE_MAINT_COMMENT_COL ISSUE_MAINT_COMMENT_T
    CREATE OR REPLACE TYPE ISSUE_VERSION_COL_T AS TABLE OF ISSUE_VERSION_T;
    And the stored procedure as :
    =======================================
    PROCEDURE get_all_issue_version_col
    ( pv_issue_version_col OUT issue_version_col_t
    AS
    CURSOR cur_issue_version
    IS
    SELECT
    issue_version_t (
    SHARE_OUTST_T (so.shr_outst_amt )
    , SECURITY_T ( s.vote_per_shr
    , s.sec_cusip
    , s.PRI_MKT_EXCH_CD
    , s.IV_TYPE_CD
    , s.SEC_TICKER_SYMB )
    , ALTERNATE_ID_T (a.ALT_ID_TYPE)
    , ISSUER_T (i.ISSR_ID )
    , ISSUE_MAINT_VERSION_T (imv.im_key_id
    , imv.im_ver_num
    , imv.eff_tmstmp
    , imv.exp_tmstmp
    , imv.next_review_tmstmp
    , imv.appr_status_ref_id
    , imv.vote
    , imv.add_usr_id
    , imv.add_tmstmp
    , imv.upd_usr_id
    , imv.upd_tmstmp
    , imv.lock_level_num
    , NULL )
    , ISSUE_SHARE_MAINT_T (ism.im_key_id
    , ism.im_ver_num
    , ism.shr_outst_amt
    , ism.curr_outst_amt
    , ism.add_usr_id
    , ism.add_tmstmp
    , ism.upd_usr_id
    , ism.upd_tmstmp
    , ism.lock_level_num
    , NULL)
    , ISSUE_MAINT_COMMENT_T(imc.im_key_id
    , imc.im_ver_num
    , imc.comment_txt
    , imc.add_usr_id
    , imc.add_tmstmp
    , imc.upd_usr_id
    , imc.upd_tmstmp
    , imc.lock_level_num
    , NULL )
    FROM
    share_outst so
    , security s
    , alternate_id a
    , issuer i
    , issue_maintenance_version imv
    , issue_share_maintenance ism
    , issue_maintenance_comment imc
    WHERE
    s.sec_key_id = so.SEC_KEY_ID
    and s.SEC_KEY_ID = a.SEC_KEY_ID
    and s.MSTR_ISSR_KEY_ID = i.ISSR_KEY_ID
    and s.SEC_CUSIP = imv.SEC_CUSIP (+)
    and s.SEC_CUSIP = ism.SEC_CUSIP (+)
    and imv.IM_KEY_ID = imc.IM_KEY_ID (+);
    BEGIN
    OPEN cur_issue_version ;
    FETCH cur_issue_version BULK COLLECT INTO pv_issue_version_col ;
    CLOSE cur_issue_version ;
    END ;
    PROCEDURE get_all_issue_col_v1
    ( pv_issue_version_col OUT NOCOPY issue_version_col_t
    , pv_row_count IN number
    , pv_issuer_id IN VARCHAR2
    AS
    CURSOR cur_issue_version
    IS
    SELECT
    issue_version_t (
    SHARE_OUTST_T (so.shr_outst_amt )
    , SECURITY_T ( s.vote_per_shr
    , s.sec_cusip
    , s.PRI_MKT_EXCH_CD
    , s.IV_TYPE_CD
    , s.SEC_TICKER_SYMB )
    , ALTERNATE_ID_T (a.ALT_ID_TYPE)
    , ISSUER_T (i.ISSR_ID )
    , ISSUE_MAINT_VERSION_T (imv.im_key_id
    , imv.im_ver_num
    , imv.eff_tmstmp
    , imv.exp_tmstmp
    , imv.next_review_tmstmp
    , imv.appr_status_ref_id
    , imv.vote
    , imv.add_usr_id
    , imv.add_tmstmp
    , imv.upd_usr_id
    , imv.upd_tmstmp
    , imv.lock_level_num
    , NULL )
    , ISSUE_SHARE_MAINT_T (ism.im_key_id
    , ism.im_ver_num
    , ism.shr_outst_amt
    , ism.curr_outst_amt
    , ism.add_usr_id
    , ism.add_tmstmp
    , ism.upd_usr_id
    , ism.upd_tmstmp
    , ism.lock_level_num
    , NULL)
    , ISSUE_MAINT_COMMENT_T(imc.im_key_id
    , imc.im_ver_num
    , imc.comment_txt
    , imc.add_usr_id
    , imc.add_tmstmp
    , imc.upd_usr_id
    , imc.upd_tmstmp
    , imc.lock_level_num
    , NULL )
    FROM
    share_outst so
    , security s
    , alternate_id a
    , issuer i
    , issue_maintenance_version imv
    , issue_share_maintenance ism
    , issue_maintenance_comment imc
    WHERE
    s.sec_key_id = so.SEC_KEY_ID
    and s.SEC_KEY_ID = a.SEC_KEY_ID
    and s.MSTR_ISSR_KEY_ID = i.ISSR_KEY_ID
    and s.SEC_CUSIP = imv.SEC_CUSIP (+)
    and s.SEC_CUSIP = ism.SEC_CUSIP (+)
    and imv.IM_KEY_ID = imc.IM_KEY_ID (+);
    BEGIN
    OPEN cur_issue_version ;
    FETCH cur_issue_version BULK COLLECT INTO pv_issue_version_col ;
    CLOSE cur_issue_version ;
    END ;
    ====================
    When I execute this stored procedure thru rapid sql, I get error
    Error: ORA-06550: line 1, column 21:
    PLS-00306: wrong number or types of arguments in call to 'GET_ALL_ISSUE_VERSION_COL'
    ORA-06550: line 1, column 21:
    PL/SQL: Statement ignored, Batch 1 Line 1 Col 21
    What is that I am missing?
    Any help would be greatly appreciated.

    I've never tried Rapid SQL, but my guess is that you can't pass objects through it. I'd write a test case on the server and try it there. It looks like it should work but I didn't build a test case. If it works on the server but not in the tool, it's like the tool. OCI8 doesn't support passing instantiated objects.

  • Sqlbase - how to run a stored procedure with SYSDATE argument

    Hi, everyone!
    I'm trying to execute a stored procedure :
    cstmt = con.prepareCall("{ call PR_MYPROCEDURE(?, SYSDATE-1, SYSDATE) }");
    cstmt.setInt(1,1);And i get and SqlException - java.sql.SQLException: prepareCall(): An unexpected character 'S' found.
    Is there any way to pass a SYSDATE like argument?

    the problem that for sqlbase current date function is SYSDATE'sqlbase' the database?
    I couldn't ensure that the syntax that you posted looks correct but it seems possible.
    That would suggest there is a driver problem.
    Best I can suggest is modify the proc so it expects nulls for two parameters and then it creates the expressions that you are passing. Or create java Timestamp values and pass those.

  • How to incorporate  a Stored procedure with ARD file (ADD ON)

    hi experts
    i created a SP  which is called by the following code.
    Dim GD As SAPbouiCOM.Grid
            Dim Query As String = "exec sp_Attendance_Report'" & vmonth & "','" & vyear & "'"
            GD = objForm.Items.Item("10").Specific
            GD.DataTable.ExecuteQuery(Query)
    while creating add on (ard file )how to incorporate   this stored procedure?
    thanks in advance

    Hello
    When the addon first time connect, you must check that the SP is exists or not exists in target database. If not exist, you may create it.
    sql to check the sp exists
    select 1 from sysobjects where name like 'sp_Attendance_Report'
    if this query returns 1 the sp is exists in the database, skip installation, if returns no records, you must install the sp via recordset by create procedure command.
    Regards
    János

Maybe you are looking for