JDBC callableStatement stored procedure call cancellation?

up vote0down votefavorite
I have a very complex oracle stored procedure that searches and retrieves some data. The procedure returns an output parameter - an oracle cursor. I execute the procedure by JDBC:
CallableStatement stmt = conn.prepareCall("{call myprocedure(?,?,?,?}");
The problem is, the queries can sometimes take quite long (few minutes) and i would like user to be able to cancel the query anytime by clicking button. I have reference to stmt object, but unfortunatelly calling stmt.cancel() (from other thread) has NO EFFECT.
On the other hand when i change the CallableStatement sql to some query like:
CallableStatement stmt = conn.prepareCall("select * from all_objects");
i get "java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation" after calling stmt.cancel() - so thats the right reaction.
Does that mean than i cannot cancel stored procedure call via jdbc, but only simple select statements? Does anyone else had and resolved similar problem?
I guess i could cancel the query by oracle kill session, but i use connection pooling (jboss) and i have plenty of sessions for the same user existing.
Database Product Version is Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production JDBC Driver Version is 11.2.0.4.0
any help will be appreciated.

This property didnt help, still no reaction after statement.cancel().
I could not cancel the statment from the db size , so i decided to spawn new java thread and run the statement in that thread, and when user clicks cancel button i just cancel the thread, some snipper of code below:
               AtomicBoolean userCanceled - this must be AtomicBoolean or  volatile variable, so other threads would see the change of variable after clicking button
               try{
                MyCallableQuery callable = new MyCallableQuery(rs,stmt,this,rsh,outParameter);
                FutureTask<T> queryTask = new FutureTask<T>(callable);
                ExecutorService executor = Executors.newFixedThreadPool(1);
                executor.execute(queryTask);                 
                while  (!queryTask.isDone()){         //stil processing statement            
                 Thread.sleep(100);
                      if (userCanceled)){               //user decided to cancel
                       futureTask1.cancel(true);
                       executor.shutdown();
                       throw new SQLException("User decided to cancel procedure call");
                 result = futureTask1.get(); 
                 //here the code after the resultset has been processed without cancelation
               catch (SQLException e}{
               //here the code when user decided to cancel  like clearing the datatable
and my callable class is like:
public class MyCallable<T> extends ProcRunner implements Callable<T> {
    private ResultSet rs;
    private CallableStatement stmt;
    private ProcRunner procRunner;
    private ResultSetHandler<T> rsh;
    private Integer outParameter;
    public MyCallable(ResultSet rs,CallableStatement stmt,ProcRunner procRunner,ResultSetHandler<T> rsh,Integer outParameter){
        this.rs = rs;
        this.stmt = stmt;
        this.procRunner = procRunner;
        this.rsh = rsh;
        this.outParameter = outParameter;
    @Override
    public T call() throws Exception {
       T result = null;     
      stmt.executeUpdate();
       rs = (ResultSet) stmt.getObject(outParameter);
       rs = this.wrap(rs);
       result = rsh.handle(rs);  
    return result;

Similar Messages

  • JDBC Adapter stored procedure call

    Hi All,
    I have a requirement of calling stored procedure through Reciever JDBC Adapter, where in multiple records are to be provided as input at a time, also multiple records should be recieved at a time.
    Can any one tell me how the structure of data type should be.
    Thank in Advance,
    With Regards,
    Zafar Ali

    Hello Ali,
                     At structure level, the root node should set to  0..unbound as we intend to process multiple records, if the records are having same structure.
    [Jdbc scenario|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417800)ID1319542550DB11163633639799272972End?blog=/pub/wlg/1772]
    Regards,
    prasanna

  • Jdbc receiver stored procedure call

    This is my stored procedure in sybase
    create procedure fn_acf2
        @proj_name   char(4),
        @ver         char(1),
        @function_code char(4),
        @ident_number char(9),
        @agent_id     char(6)               
        as
        declare @msg char(30)
        declare @return_code int
        declare @str_return char(5)
    begin
        if @ver != "1"
           begin
             print "Invalid version number for 'FNA2'"
             return(-1)
           end
           execute @return_code = SGW003...fn_acf2_security @proj_name, @ver, @function_code, @ident_number, @agent_id
           if @@error != 0
             begin
               select convert(char(5),@return_code)
             end
        else
           return (@return_code)
    end
    go
    MY REQUEST structure looks like
    MT_Sybase_Request
    statement (element of MT_Sybase_Request)
    fn_acf2 (element of statement)
    action (attribute of fn_acf2) ( have hard coded as EXECUTE)
    proj_name(element of fn_acf2)
    type (attribute of proj_name) hard coded as char
    isInput (attribute of proj_name) hard coded as 1
    ver(element of fn_acf2)
    type (attribute of ver) hard coded as char
    isInput (attribute of ver) hard coded as 1
    funtion_code(element of fn_acf2)
    type (attribute of function_code) hard coded as char
    isInput (attribute of function_code) hard coded as 1
    ident_number(element of fn_acf2)
    type (attribute of ident_number) hard coded as char
    isInput (attribute of ident_number) hard coded as 1
    agent_id(element of fn_acf2)
    type (attribute of agent_id) hard coded as char
    isInput (attribute of agent_id) hard coded as 1
    Should i put element name under statement as fn_acf2  or fn_acf2_security
    Is the above structure correct?
    I have followed these blogs
    JDBC Stored Procedures
    SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH

    all elements are under fn_acf2
    but i want you guys look my Stored procedure
    execute @return_code = SGW003...fn_acf2_security @proj_name, @ver, @function_code, @ident_number, @agent_id
    in the above stmt,
    iam confused why it fn_acf2_security was used instead of an_acf2 ( fn_acf2 is my Stored procedure name)
    what does execute @return_code mean ( actually return_code is my response structure element)
    my response wil have only elemnt which is return_code.

  • DML visibility in stored procedures called via JDBC

    Hello,
    I have two stored procedures, A and B. Proc A inserts Q into table X. Proc B selects Q from table X to insert it into table Y. Neither procedure does a COMMIT.
    My Java class executes Proc A and then Proc B within a transaction (autocommit is false). But Proc B fails to select Q from table X with the No Data Found error, apparently unable to see the recently inserted Q.
    If these two procedures are called from a SQL*Plus block, everything succeeds.
    Does anyone have a clue about what I am missing? All my DML should be visible to my session.
    Thank you in advance for any suggestions.
    - CJ

    Thank you, Joe, for your reply!
    To the best of my knowledge, all of my stored procedure calls are being made from the same connection so I can rollback everything if necessary. I have not explicitly closed the connection between calls. The debugger indicates my connection session id never changes across calls.
    Do you know of any JDBC trace tools that might help me verify my connections? I've enabled logging with oracle.jdbc.driver.OracleLog.setTrace(true) but it doesn't really give me specific connection information - at least not that I can tell. :)
    Thanks!
    Cori

  • How to use Stored Procedure Call in Sender JDBC adapter

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

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

  • Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER

    Hi Experts,
    What is significance of Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER.
    Thanks,
    ABDUR

    I guess this would be applicable for the folowing formats - DATE, TIME, TIMESTAMP.
    This is the correct link
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards,
    Prateek

  • Stored Procedure call from JDBC sender for Oracle Database

    Hi,
    I have a requirement to call stored procedure using JDBC sender adapter for retriving data from an Oracle database.
    I need to execute first stored procedure call from Querry SQL statement and then trigger second stored procedure call for confirming the succesful retrival of those records from the update SQL statement.
    Querries:
    1. Can we trigger stored procedure from Update statement of JDBC sender.
    2. Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    3. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    Please note PI does not have direct access to main table and hence the need to have separate stored procedure calls.
    The PI version is PI 7.11 sp4.
    Appreciate your inputs.
    Thanks.
    Siddhesh S.Tawate

    >1. Can we trigger stored procedure from Update statement of JDBC sender.
    I think not possible using update statement.
    > Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    Yes using select query you can call stored procedure.
    >. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    No select and update handles in the same session using the same thread so if one transaction fails update should not proceed.

  • Response from one stored proc. to another stored procedure call in JDBC

    Hi,
    I have to call 2 stored procedures, where the response from first stored procedure ( an id) is mapped as a parameter to the second stored procedure call.
    My question is that can this be achieved without using BPM?
    Can we somehow map the response from the stored procedure 1 to stored procedure 2 parameter w/o using BPM?
    I have to insert multiple rows using the stored procedure.
    Should I use STATEMENT unbounded times ( which means stored procedure is called multiple times) or should I use the parameter as unbounded ( like an array, maybe define the parameter as an array in the stored procedure)?
    From the performance standpoint, which approach is better?
    Please suggest.

    Hi Ardent !
    I think you could use 2 mapping programs (message mapping objects) in your interface mapping. The first one, executes and returns the ID to a message type defined by you for internal use only between both stored procedure executions. The second ones uses that message type as source message and the XML required by the JDBC for the second stored procedure execution as target message type. This can be done without BPM.
    Regards,
    Matias.

  • Pass a null value to a JDBC stored procedure call?

    pass a null value to a JDBC stored procedure call? Is this even possible? My DBA gave me a procedure to call that sometimes requires a null value. I don't think this is even possible.

    do you mind tell me how to resolve your problem?i using the setnull method,but it doesn't work.

  • Regional settings influences jdbc stored procedure calls?

    Hi,
    We have a strange problem: we use a jdbc test client
    that does a simple stored procedure call with one
    input parameter (integer) and one output parameter
    (integer). Like:
    "? = callprocedure(?)" . The database resides on a different server.
    The problem is: this only works when we use "netherlands" regional setting on the windows 2000 machine that
    java client program runs on. If we switch to
    "english (united states)" the call gives other results
    in the output parameter / returns an error code.
    Does this have something to do with the Locale of the
    virtual machine? Or do I have to do something with
    NLS_LANG to eliminate the behaviour that is dependent on
    the windows regional settings? Please help!
    Thanks,
    Michel Schudel
    We use the Oracle JDBC thin driver, latest version.
    (archive: classes12.zip)

    Ok, here it is. Basically, I first call a stored procedure called SETPARAM which receives two Strings:
    a parameter name and a a parameter value. After that, I
    call a procedure called RUNSQLKIT without any input parameters. The output parameter is an integer that indicates the number of "cells" in the output message. After that, I start to retrieve the cells but that is not important here. What happens is: with Dutch regional settings, the number of cells is normal (387) but with
    US settings, the number of cells is -1 (indicates an error.) Why? I use no dates or floating point values as
    input/output!
    Jvm version is 1.3.1_08, oracle driver is 8.1.7
    (Oracle 8i) thin jdbc driver. Oracle runs on AIX.
    conn = m_dataSource.getConnection();
    // Setup the input params
    stmtInput = conn.prepareCall("BEGIN Pck_Sqlmast.setparam(?,?); END;");
    for (final Iterator iter = m_kitParameterNames.iterator(); iter.hasNext();) {
    final String sName = (String) iter.next();
    final String sValue = input.getParameter(sName);
    if (sValue != null) {
    stmtInput.setString(1, sName);
    stmtInput.setString(2, sValue);
    stmtInput.executeUpdate();
    // Call the kit
    stmtRun = conn.prepareCall("BEGIN ? := Pck_Sqlmast.runsqlkit(?); END;");
    stmtRun.registerOutParameter(1, Types.INTEGER);
    stmtRun.setString(2, m_kitName);
    stmtRun.executeUpdate();
    final int iCells = stmtRun.getInt(1);
    Hi Michel,
    Perhaps you would care to post some more information
    including:
    1. Entire error message and stack trace you are
    getting.
    2. The part of your java code where the error
    occurs.
    3. Java version you are using.
    4. Oracle database version you are using.
    5. Platform on which Oracle database is running.
    Good Luck,
    Avi.

  • Structure for Stored Procedure Call

    Hi All,
             Guys I am trying to call a stored procedure call using receiver jdbc adapter...
    This is the outgoing message:
    <b><?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:SP_DB xmlns:ns0="urn:sce-com:xi:dev:mohammf">
    - <Test>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">CC</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
    - <PP_TEST_P action="EXECUTE">
      <table>PP_TEST_P</table>
      <RECTYPEIND type="CHAR">XX</RECTYPEIND>
      <JENUMBER type="CHAR">76724</JENUMBER>
      <COMPANY type="CHAR">BCEO</COMPANY>
      <CONSTANT1 type="CHAR">AB</CONSTANT1>
      <SYSTEMDATE type="CHAR">08/12/2007</SYSTEMDATE>
      <DR_CR_ID type="CHAR">0</DR_CR_ID>
      <AMOUNT type="CHAR">934928599475843</AMOUNT>
      <MONTH_NUMBER type="CHAR">000008</MONTH_NUMBER>
      <COST_CENTER type="CHAR">LosAngeles</COST_CENTER>
      <ORDERNO type="CHAR">694950375830</ORDERNO>
      <WBS type="CHAR">Southern California Edis</WBS>
      <ACCOUNTID type="CHAR">6949503758</ACCOUNTID>
      <BATCH_ID type="CHAR">3408102007</BATCH_ID>
      <ASSIGNMENT type="CHAR">Technology Solutio</ASSIGNMENT>
      <GL_JOURNAL_CATEGORY type="CHAR">GHTF</GL_JOURNAL_CATEGORY>
      <PROFIT_CENTER type="CHAR">3434694950</PROFIT_CENTER>
      <REFDOCNUMBER type="CHAR">00000000004304300056006056</REFDOCNUMBER>
      </PP_TEST_P>
      </Test>
      </ns0:SP_DB></b>
    The error I am getting is: 
    <b><i>2007-08-20 09:44:05 Error Unable to execute statement for table or stored procedure. 'PP_TEST_P' (Structure 'Test') due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
    2007-08-20 09:44:05 Error Exception caught by adapter framework: null
    2007-08-20 09:44:05 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PP_TEST_P' (structure 'Test'): java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'table' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !).</i></b>
    Pls advice..
    XIer
    Message was edited by:
            XIer

    Hi,
    Check your DATA TYPE attributes with the attributes of the column names in the Database table.  There is a mismatch between the DT and Table in the database.
    <b>Cheers,
    *RAJ*</b>

  • Stored Procedure call to Oracle - issue

    hi ,
    I am trying to call a receiver JDBC adapter to call an oracle stored procedure -
    I got this error ->
    java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call  - which I understand is related to mismatch btw the XML and Stored procedure
    I checked the XMl and it matches the stored procedure call.  I have two specific questions -
    1) I have used SAP Note 801367 to have  a look at the SQl command sent to the db.. However I do not see the stored procedure in the Audit logs...Does this feature work for Stored procedures too?
    2) Can you look at the XML sent to the JDBC adapter...I saw something wierd... even though I had declared the isOutput attribute first and then attribute type... when I  loaded the MT into the mapping the order changed...Does than matter?
      <customer_id isInput="true" type="VARCHAR">5000123</customer_id>
      <product_id isInput="true" type="VARCHAR">0041003</product_id>
      <serial_number isInput="true" type="VARCHAR">1</serial_number>
      <effective_date isInput="true" type="VARCHAR">2010-03-16</effective_date>
      <quantity isInput="true" type="NUMERIC">1.000</quantity>
      <currency_code isInput="true" type="VARCHAR">USD</currency_code>
      <dist_channel_id isInput="true" type="VARCHAR">11</dist_channel_id>
      <division_id isInput="true" type="VARCHAR">04</division_id>
      <org_unit_id isInput="true" type="VARCHAR">1005</org_unit_id>
      <config_name isInput="true" type="VARCHAR" />
      <resolved_price type="NUMERIC" isOutput="true" />
      <resolved_currency type="VARCHAR" isOutput="true" />
      <contract_id type="VARCHAR" isOutput="true" />
      <contract_desc type="VARCHAR" isOutput="true" />
      <contract_owner_id type="VARCHAR" isOutput="true" />
      <payment_terms type="VARCHAR" isOutput="true" />
      <product_group_id type="VARCHAR" isOutput="true" />
      <commitment_id type="VARCHAR" isOutput="true" />
      <tier_index type="VARCHAR" isOutput="true" />
      <shipping_flag type="VARCHAR" isOutput="true" />
      <result_code type="VARCHAR" isOutput="true" />
      <exec_time type="NUMERIC" isOutput="true" />
    java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call

    Arvind,
    Just to be sure: are all inputs to yourstored procedure of type varchar, or are there maybe inputs with different types?
    A mismatch between the type specified in the XML and the expected inputs of the SP can also cause this error.
    Regards,
    Koen

  • Stored procedure call returns null result set when using temp table in sp!

    Here's a really odd problem...
    SQL Server stored procedure called sp_Test takes 1 input INT. Here is the code I call it with
    cStmt = connection.prepareCall("{call sp_Test(?)}");
    cStmt.setInt(1, 44);
    cStmt.execute();
    rs = cStmt.getResultSet();When the body of the stored proc is
    CREATE PROCEDURE sp_Test(@i_NodeID INT)
    AS
    BEGIN
      SELECT node_id FROM tbl_NavTree
    END
    GOthe query works and I get all node_id back in rs
    BUT when the body of the stored proc is
    CREATE PROCEDURE sp_Test(@i_NodeID INT)
    AS
    BEGIN
      CREATE TABLE #Descendants(
        descendant_id INT
      SELECT node_id FROM tbl_NavTree
      DROP TABLE #Descendants
    END
    GOThe rs comes back as NULL. Really really weird if you ask me. I also tried removing the DROP TABLE line just in case the SELECT had to be the last statement but still NULL.
    Final note is that BOTH the above stored proc bodies work when executed within SQL Server query analyser.
    Must be JDBC .. what can it be!??

    DROP TABLE #DescendantsMS SQL Server - right?
    Then don't drop the table.
    From the MS docs for "create table"
    Local temporary tables are visible only in the current session;
    A local temporary table created in a stored procedure is dropped automatically when the stored procedure completes. The table can be referenced by any nested stored procedures executed by the stored procedure that created the table. The table cannot be referenced by the process which called the stored procedure that created the table.

  • Too many arguments for stored procedure call

    I have a stored procedure with 34 arguments, including the return value. I am trying to call it from java using JDBC thin drivers (jdk11, oracle815), but I get the "wrong number or types of arguments" error message. JDBC-OCI fails also. I saw a reference in this discussion group to there being a limit of 32 arguments for stored procedure calls from jdbc (posted 6/29/99). Is there such a limit? If so, is there a fix or workaround? If there is not a limit, how can I determine which argument is causing the problem?
    Many thanks.
    Mike
    java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'PUT_CHECK'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement
    .java)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java)
    at metris.quickcheck.database.DS1.main(DS1.java:79)
    null

    I must confess I still don't understand your problem. By rows ...
    I have an sql that recodes a column and has 1450 rows. This doesn't work
    although when I use the same with less rows 40-60 it works.... do you mean rows in the table or elements in the CASE() statement ?
    From the 9i SQL Reference:
    " The maximum number of arguments in a CASE expression is 255, and each WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices, you can nest CASE expressions. That is return_expr can itself be a CASE expression."
    According to the 10g docs the limit is the same there.
    Cheers, APC

  • Capture error messages from stored procedure calls

    Hi there,
    How do I capture a stored procedure calls error messages provided the stored procedures does not have output parameters? This questions applies to Oracle 7.3.4 stored procedures calls.
    TQ
    Neo

    There are two parts.
    The stored proc must 'throw' an exception.
    And java must catch it.
    You probably already have the java part. That is the catch(SQLException).
    As for the stored proc you can use the following search string in the jdbc forum
    raise oracle
    You need to use 'raise' in the stored proc but I am not sure of the exact form, but one of the threads using the above search string is likely to have it.

Maybe you are looking for

  • My apps wont update

    Hi there. I recently had a problem with my apps. They work perfectly on my iPhone 3G 3.1 (7C144), and they all appear at my itunes. The problem is that many of them can be updated. In iTunes, it shows me a text under my apps that is saying "x updates

  • Why are so many songs duplicated in my library?

    Just recently lost hard drive to failure.  Replaced drive and reloaded ITunes.  Now I have many many songs that are duplicated in my library.......almost all of them!  Does this mean that I have duplicates in my ITunes music folder, or that I have mo

  • This is my fifth account. Why does it keep getting...

    It'll be working perfectly fine, and a minute later Skype closes. Says my login is invalid. I'm getting sick of this.

  • Photoshop CC2014 doesn't open.

    I just installed CC2014, and it's just prompting the license agreement when i try to open it, what i have to do? Im on mac btw. Problem's screenshot: http://prntscr.com/5ve3xn .

  • Tab_Page Canvas

    Hi, I'm creating a Canvas that has some tab_pages. I would like to know if the edge of the tab canvas can be bigger because when I run the form, the tittle doesn`t fit. Thanks.