Call stored function return array

Hi all,
I have a function as follow:
create or replace TYPE string_table IS TABLE OF VARCHAR2(2000);
create or replace TYPE ARRAYTYPE is VARRAY(20) OF VARCHAR2(30);
create or replace FUNCTION getEmpArray(s varchar2, t varchar2, st string_table) RETURN ARRAYTYPE AS
l_data ARRAYTYPE := ARRAYTYPE();
BEGIN
l_data.extend; l_data(l_data.count) := s; l_data.extend; l_data(l_data.count) := t; l_data.extend; l_data(l_data.count) := st(1); RETURN l_data;
END;
I want to call this function by StoredFunctionCall
code:
StoredFunctionCall fun = new StoredFunctionCall();
fun.setProcedureName("getEmpArray".toUpperCase());
Object[] arr = new Object[]{"aa", "fgfg", "bbb"};
ArrayDescriptor arrDescriptor =
ArrayDescriptor.createDescriptor("string_table".toUpperCase(),
connection);
ARRAY arrayToPass = new ARRAY(arrDescriptor, connection, arr);
fun.addUnamedArgumentValue("a");
fun.addUnamedArgumentValue("b");
fun.addUnamedArgumentValue(arrayToPass);
fun.setResult("FUNCTION_RESULT"); // for get result by this name
Vector<DatabaseRecord> list = session.executeSelectingCall(fun);
But Exception
PLS-00382: expression is of wrong type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Error Code: 6550
Call: BEGIN ? := GETEMPARRAY(?, ?, ?); END;
     bind => [=> FUNCTION_RESULT, a, b, oracle.sql.ARRAY@21fbc01]
Please help me
Edited by: fbg on 21:52 26-04-2010

A few issues,
1 - JDBC does not support the PLSQL TABLE type, you must use a VARRAY type, or wrap the TABLE function call in a function that takes a VARRAY.
TopLink also has support for PLSQL types in its PLSQLStoredProcedureCall class, but no support is currently offered for StoredFunctions.
You can't pass the VARRAY type for the TABLE argument.
2 - Your function returns a VARRAY, so you need to define this type in the StoredFunctionCall result.
We don't currently expose the API to set a Array type for the result, so you would need to access the call's first parameter directly, or use a StoredProcedureCall (and convert your function to a procedure).
You may also wish to investigate returning a cursor from a stored procedure instead of the varray.
You could also access the JDBC connection directly and perform the call using JDBC code.
Feel free to log these issues in EclipseLink.
James : www.eclipselink.org

Similar Messages

  • Calling Stored function and showing returned value on the UI screen

    I am calling a stored function by using the following steps mentioned as per the below link. The stored function returns a single scalar value
    http://download.oracle.com/docs/cd/E1790401/web.1111/b31974/bcadvgen.htm#sm0297_
    Please verify if I am putting the code in the classes as required by the ADF framework.
    * 1) In class CustomApplicationModuleImpl extends ApplicationModuleImpl*
    // Some constants
    public static int NUMBER = Types.NUMERIC;
    public static int DATE = Types.DATE;
    public static int VARCHAR2 = Types.VARCHAR;
    protected Object callStoredFunction(int sqlReturnType, String stmt,
    Object[] bindVars) {
    CallableStatement st = null;
    try {
    // 1. Create a JDBC CallabledStatement
    st = getDBTransaction().createCallableStatement(
    "begin ? := "+stmt+";end;",0);
    // 2. Register the first bind variable for the return value
    st.registerOutParameter(1, sqlReturnType);
    if (bindVars != null) {
    // 3. Loop over values for the bind variables passed in, if any
    for (int z = 0; z < bindVars.length; z++) {
    // 4. Set the value of user-supplied bind vars in the stmt
    st.setObject(z + 2, bindVars[z]);
    // 5. Set the value of user-supplied bind vars in the stmt
    st.executeUpdate();
    // 6. Return the value of the first bind variable
    return st.getObject(1);
    catch (SQLException e) {
    throw new JboException(e);
    finally {
    if (st != null) {
    try {
    // 7. Close the statement
    st.close();
    catch (SQLException e) {}
    With a helper method like this in place, calling the func_with_no_args procedure shown in Example 37-7 would look like this:
    *2) In class CustomServiceImpl extends CustomApplicationModuleImpl*
    public String callEnvironmentName(){
    return (String) callStoredFunction(VARCHAR2, "CAR_UTIL_PK.get_environment_name()", new Object[] {});
    3) If I have the first two steps correct, I was to display the value returned by method callEnvironmentName() with scalar values like (Development, Production etc) at the footer of each JSFX page. What is the flow I should follow, should I call callEnvironmentName() from some managed bean? Also I want to store it once on first call to some application variable and use that to populate the JSFX pages. Is there a working example. What is the best practice?
    Thanks
    Edited by: user5108636 on Apr 5, 2011 11:58 PM

    Hi John,
    Duplicate alerts are coming for BP_Confirmed as well as one custom event. Earlier I thought there is some issue with my custom event, but when it came for BP_Confirmed also, then i have a doubt something is wrong with the application.
    I have also checked that BP_Confirmed is being raised only once inside the method-BP_CONFIRM of class-cl_crmcmp_b_cucobupa_impl.
    raise event BPConfirmed
      CLASS cl_crm_ic_services DEFINITION LOAD.
      CREATE OBJECT event.
      event->set_name( if_crm_ic_events_con=>gc_bpconfirmed ).
      event_srv = cl_crm_ic_services=>get_event_srv_instance( ).
      event_srv->raise( event ).
    Are you aware of any other place from where this event is getting triggered?
    Thanks for your help!
    Regards,
    Rohit

  • How to get a stored function return value (which is not a cursor)?

    I want to do so with ADO inside Visual Basic. I know how to call a stored procedure, but nothing I tried could help me in calling a stored function and getting its return code. Note that the function has no cursors within its argument or return code.
    Your quick response would be appreciated
    Eyal

    Eyal,
    A stored function returns a value. You need to have the first parameter (of correct data type) for the returned value. The parameter binding is pretty much the same as you would do with stored procedures.
    e.g. "begin :1= proc(....); end;"
    Sinclair

  • How to call stored function in my jsp

    how to call stored function in my jsp?
    please give me a example.

    Hi,
    think we need mor einformation, like JDeveloper release and the how you do access the database (JDBC, BC4J, EJB,ADF...)
    Frank

  • Stored Procedure: Function returns Array

    I was just wondering if following scenario is possible in a stored procedure.
    I have a package, which includes 4 different functions and 1 procedure. Procdure uses ref cursor to return values in my reporting tool. What I am trying to do is to write a function which takes input and return array of varchar. Something like..
    Package ABC
    Function student_classes (student_no in Varchar2) return [array]
    begin
    select class_nbr into [array]
    from student_table
    where student_nbr = student_no;
    return [array];
    end student_classes;
    procedure students_info (rpt_cursor IN OUT rpt_type)
    begin
    OPEN rpt_cursor FOR
    select
    student_name,
    student_nbr,
    student_address,
    student_classes (student_nbr) --returns array
    from student_table;
    end student_info; --end of procedure
    end abc; --end of pacakge.
    I used [array], as I am ont sure how to define (syntax) it in spec part of package or in body. I will really appreciate if someone could help me with this function.
    Thank you

    Thanks for the reply Tonguc Y.
    I declared an array in my package declaration
    CREATE OR REPLACE PACKAGE rpt_TESTING_pkg
    AS TYPE rpt_type IS REF CURSOR;
         TYPE DIAGARRAY IS VARRAY(20) OF VARCHAR2(6);
         FUNCTION DIA_CODES (MNO IN VARCHAR2) RETURN DIAGARRAY;
         PROCEDURE member (rpt_cursor IN OUT rpt_type);
    END rpt_TESTING_pkg;
    but then when I try to use it in my function it gives me error that I should declare DIAGARRAY.
    CREATE OR REPLACE PACKAGE BODY rpt_TESTING_pkg
    as
    FUNCTION DIA_CODES (MNO IN VARCHAR2)
                   RETURN DIGARRAY AS diags DIGARRAY;
    begin
    <sql block>
    end dia_codes;
    end rpt_TESTING_pkg;
    Any suggestions.

  • Calling Stored Function from Excel

    Folks,
    Can someone help me with an Excel Macro that will call an Oracle stored function taking in parameter from one of the Excel Cell and return the value from the function into a different cell in the spreadsheet?
    Thanks

    This is not the right Forum for this query still here is something for you to start with
    The oracle function to add 1 to the input parameter
    create or replace function AddOne(ID Number) return number is
    Numout Number:=0;
    begin
    numout:=id+1;
    return numout;
    end;
    The Macro in Excel file to run the above function(Please add necessary references for ado connectivity)
    Option Explicit
    Dim Objconn As ADODB.Connection
    Sub Macro1()
    Dim StrSql As String
    Dim ObjRs As New ADODB.Recordset
    Dim I As Long
    StrSql = "Provider=OraOLEDB.Oracle.1;Password=swallocation;Persist Security Info=True;User ID=swallocation;Data Source=dumpdb"
    Set Objconn = New ADODB.Connection
    Objconn.Open StrSql
    For I = 2 To Sheet1.Rows.Count
    If Not CStr(Sheet1.Cells(I, 1)) = "" Then
    ObjRs.Open "select AddOne(" + CStr(Sheet1.Cells(I, 1)) + ") from dual", Objconn
    If Not ObjRs.EOF And Not ObjRs.BOF Then
    ObjRs.MoveFirst
    Sheet1.Cells(I, 2) = ObjRs(0).Value
    End If
    ObjRs.Close
    Else
    Exit For
    End If
    Next
    Set ObjRs = Nothing
    Objconn.Close
    Set Objconn = Nothing
    End Sub
    Hope you get something to start with
    Prakash...

  • Problem calling Stored Procedure returning SETOF UDT (Using Spring)

    I am using Spring's StoredProcedure class to call a stored procedure from a PostgreSql database. It returns a set of user defined data types. I'm having a problem in parsing the results returned.
    The user defined data type :
    CREATE TYPE process_states AS (
    process_name text,
    process_type text
    The stored procedure returns a SET of "process_state" :
    CREATE FUNTION inquire_process_state (.....)
    RETURNS SETOF process_state AS '
    SELECT ....
    I hava a Java class extending the Spring StoredProcedure classs.
    public MyProcStats extends StoredProcedure {
    private class ProcStateCallBackHandler implements RowCallBackHandler {
    public void processRow(ResultSet rs) throws SQLException {
    System.out.println(rs.getString(1));
    public MyProcStats (DataSource ds) {
    super(ds, "inquire_process_state");
    super.setFunction(true);
    declareParameter(new SqlOutparameter("rs", Types.OTHER, new ProcStateCallBackHandler());
    declareParameter(new SqlParameter("family_name", Types.VARCHAR) ;
    While testing this class, I get an errormessage
    "java.sql.SQLException:ERROR: cannot display a value of type record"
    I would appreciate if anyone can point out my mistakes. I tried declaring
    new SqlOutParameter("rs", Types.OTHER, "process_state"), but that didn't help.

    As the related posts suggest, you will need to use direct JDBC code for this.
    Also I'm not sure JDBC supports the RECORD type, so you may need to wrap your stored functions with ones that either flatten the record out, or take OBJECT types.

  • Calling Stored Function from DOT NET

    Hi,
    I am trying to call a stored function "PKG_MIS_USER_MASTER.ADD_USER(userid varchar2, password varchar2) return NUMBER" from my DOT NET application.
    Everything works fine within TOAD. Can anyone please help me in writing the C# code for calling a stored function along with its return value.
    Thanks in Advance.

    You can (as of 15-JUL-2005) get chapter 5 and chapter 7 of my book from the ODP.NET homepage, which is located here:
    http://www.oracle.com/technology/tech/windows/odpnet/index.html
    The link is at the bottom of the page.
    The direct link is:
    http://www.oracle.com/technology/books/pdfs/dotnet_ch5_7.pdf
    Chapter 5 covers using PL/SQL from .NET.
    - Mark

  • Calling Stored Function from TopLink

    I have a simple Stored Function that I'm trying to call using TopLink API:
    TopLink Version: 10.1.3.3.
    Oracle JDBC Driver: ojdbc5.jar (Oracle JDBC Driver version - "11.1.0.6.0-Production+")
    Stored Procedure:
    Function Get_Email_Address_Id(P_EMAIL_ADDRESS IN varchar2) return number;
    TopLink Code:
    public String executeStoredFunction() {
    TopLinkTemplate tlTemplate = getTopLinkTemplate();
    StoredFunctionCall call = new StoredFunctionCall();
    call.setProcedureName("EMAIL_ADDRESS_PKG.Get_Email_Address_Id");
    call.setResult("FUNCTION_RESULT", String.class);
    call.addNamedArgument("P_EMAIL_ADDRESS");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("P_EMAIL_ADDRESS");
    Vector parameters = new Vector();
    parameters.addElement("1009");
    String result = (String)tlTemplate.executeQuery(query, parameters.toArray());
    return result;
    Error I'm getting:
    Exception [TOPLINK-7121] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070428)): oracle.toplink.exceptions.ValidationException
    Exception Description: DatabasePlatform does not support stored functions
         at oracle.toplink.exceptions.ValidationException.platformDoesNotSupportStoredFunctions(ValidationException.java:1299)
         at oracle.toplink.queryframework.StoredFunctionCall.prepareInternal(StoredFunctionCall.java:52)
         at oracle.toplink.internal.databaseaccess.DatabaseCall.prepare(DatabaseCall.java:494)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.prepareCall(CallQueryMechanism.java:102)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.prepareExecuteSelect(CallQueryMechanism.java:203)
         at oracle.toplink.queryframework.DataReadQuery.prepare(DataReadQuery.java:150)
         at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(DatabaseQuery.java:405)
         at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(DatabaseQuery.java:375)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:598)
         at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:96)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:965)
    Observations:
    Why is TopLink complaining about DatabasePlatform?
    I'm using Oracle 10g as my database platform. Did anyone encounter this problem?
    I have tried various combinations but it always have same complaint.
    Thanks in advance for help.

    Hello,
    It is complaining because the DatabasePlatform being used doesn't support functions. So the problem is that it is using the DatabasePlatform instead of the Oracle10Platform that you are expecting. How have you defined it? Could you have multiple sessions.xml files, and the one that is being picked not define the Oracle10Platform? Or could you be overriding the login somehow (prelogin event etc) and setting it to use the default DatabasePlatform by accident?
    Best Regards,
    Chris

  • Calling stored function that contains commit from .JCX

    I would like to call a stored function (Oracle) that contains a commit, from
    a WebLogic database control (.JCX). The suggested way to call a stored
    function is to do something like:
    * @jc:sql statement::
    * SELECT MY_FUNCTION({projectID}, {staffID}) FROM DUAL
    int callMyFunction(int projectID, int staffID) throws SQLException;
    This doesn't work if the function contains a commit - I get: ORA-14552:
    cannot perform a DDL, commit or rollback inside a query or DML. I don't
    want to just get my own connection to the db in my code and call it directly
    because then I won't be using the connection pool provided by WebLogic. Is
    there a recommended way to do this? So far, the database control has taken
    care of getting connections from the pool. Can I get a connection from the
    pool explicitely and use it? How do I "return" it to the pool?
    Thanks.
    Steve

    Steve Kincer wrote:
    Thanks for the response.
    So far, I've only used the database control, so I haven't been doing any
    transaction management (rollbacks/commits) myself - I've just called methods
    in my database control and not worried it. Come to think of it, all my
    other calls are just SELECTs, so it hasn't been an issue, but I've assumed
    WebLogic or the connection pool would take care of transaction management
    for me if I coded an UPDATE function in the database control.
    What do you mean by "find and use the control API provided for
    defining/demarking
    transactions" ... what control?
    I've seen stuff in the help file about transaction management, so I can
    research that, but where do I get the connection to use for this? I'm
    thinking I should get it from the pool (rather than create my own
    connection). I saw a generated method in my database control called
    getConnection, but when I tried using it with a CallableStatement I got
    error:
    "The transaction is no longer active - status: 'Committed'. No further JDBC
    access is allowed within this transaction."This means that you are automatically being taken care of transactionally,
    and don't need to do any commit() calls.
    Joe
    >
    I guess it's pretty obvious that I'm pretty new to WebLogic.
    Thanks for your help.
    Steve
    "Joe Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Steve Kincer wrote:
    I would like to call a stored function (Oracle) that contains a commit,
    from a WebLogic database control (.JCX). The suggested way to call a
    stored function is to do something like:
    * @jc:sql statement::
    * SELECT MY_FUNCTION({projectID}, {staffID}) FROM DUAL
    int callMyFunction(int projectID, int staffID) throws SQLException;
    This doesn't work if the function contains a commit - I get: ORA-14552:
    cannot perform a DDL, commit or rollback inside a query or DML.Right. It is bad style to hide a commit in a procedure. The begin-tx
    and commit should be at the same level, above any specific SQL for the
    tx. How did you start a transaction? Are you sure you have an ongoing
    transaction?
    I don't
    want to just get my own connection to the db in my code and call it
    directly because then I won't be using the connection pool provided by
    WebLogic. Is there a recommended way to do this? So far, the database
    control has taken care of getting connections from the pool. Can I get a
    connection from the pool explicitely and use it? How do I "return" it to
    the pool?You should find and use the control API provided for defining/demarking
    transactions.
    Joe
    Thanks.
    Steve

  • Calling stored function within select

    Hi,
    I am working with ODP.NET and Oracle 8.1.7 for two years now and I solved a lot of problems. But now I am really in trouble:
    I need to call a stored function (that is within a package) from a select statement:
    Here is a very simple test case (the real select is much more complicated)
    select PFM.P_COSTING.CALC ( 0 ) from dual;
    this works fine in TOAD, but When I try to do the same from C#/ODP.NET, I always get the following error:
    ORA-00904: Invalid column name
    Can anybody help?
    Here my package (scheme is “PFM”):
    CREATE OR REPLACE PACKAGE BODY P_Costing AS
    FUNCTION Calc ( x number)
    return number IS
    BEGIN
    RETURN 1;
    END Calc;
    END P_Costing;
    thanks in advance
    markus

    It works fine for me, but you might not want to use "PFM.P_COSTING.CALC ( 0 )" as a column name.
    Try aliasing the expression
    select PFM.P_COSTING.CALC ( 0 ) result from dual;
    David

  • Can I call a function using array index?

    I've defined an array which stores the function name, like this:
    var aresetButtonTop:Array = new Array(resetTop1,resetTop2,resetTop3,resetTop4,resetTop5);  
    Then I have a button named"btnresetTop" which when clicked will call one of the five functions stored in the above array(aresetButtonTop). The functions are called at run-time depending upon some conditions. I need to figure out how I can call those functions using the array index. I'm using the following code to call the function. The value of i has been already calculated.
    btnresetTop.addEventListener(MouseEvent.CLICK, aresetButtonTop[i]);
    After doing this I'm getting the following error when I click the button:
    TypeError: Error #2007: Parameter listener must be non-null.
        at flash.events::EventDispatcher/addEventListener()
        at gallerytest_fla::MainTimeline/thumbTopClick()
    Note: thumbTopClick() is a function inside which all these codes are written.
    I need to find out whether it is posible in AS3 to call a function name using the array index or not. If yes, could you pleas ehelp me out.

    Thanx Andrei1, you were right, i was out of range.The value of i will obviously expire outside the for loop. Now I have corrected my mistake by assigning the value of i to a variable index inside the for loop and then use the following code:
    btnresetTop.addEventListener(MouseEvent.CLICK, aresetButtonTop[index])
    It was a silly mistake but I was not able to figure it out for the last 2 hours. Thanks once again for your help

  • Can stored function return record type or cursor type?

    Hi everybody,
    I am working with a stored function now.
    Can the function output more that ONE result? i.e. cursor or record type.
    Thanks.
    Brigitta.

    Brigitta,
    If you are calling the stored function from SQL then the function can only return one of the base datatypes, as Murali has said. However, if you are calling the function from PLSQL you can return any complex datatype, eg:
    package test_package is
    type rec_test is
      ( col_a number
      , col b varchar2(30) );
    type tab_test is
      table of rec_test
      index by binary ineteger;
    function test_function (.....)
    return tab_test;
    end test_package;and to call this function:
    declare
    l_table test_package.tab_test;
    begin
    l_table := test_package.test_function(....);
    end;Hope that helps!

  • Oracle 8..How to call stored Procedure to call stored Function

    Student here. Using Oracle 8, without Procedure Builder. Only have SQLPlus environment. Three simple code blocks follow:
    block One Creates a Function
    block Two Creates a Procedure
    ...However, I do not know how to Start, Run, Get..@ <or whatever command at SQL> prompt, to run the Procedure to call the Function.
    block Three is a script that calls the function, but I wish to call the stored procedure (from block Two above). My user manual PL/SQL Intro does not address.
    Please provide simple SQL Plus steps, command, path whatever.
    Very grateful to any or all who assist
    Wayne
    [email protected]
    -- CODE BLOCK #1 ----------------------------
    SQL>CREATE OR REPLACE FUNCTION COST_INCREASE_F (V_INCOMINGSAL NUMBER)
    2 RETURN EMP.SAL%TYPE
    3 IS
    4 V_NEWSAL EMP.SAL%TYPE;
    5 F_CONSTANT CONSTANT NUMBER :=1.05;
    6
    7 BEGIN
    8 V_NEWSAL := V_INCOMINGSAL * F_CONSTANT;
    9 RETURN V_NEWSAL;
    10
    11 END;
    12 /
    Function created.
    -- CODE BLOCK # 2----------------------------
    SQL>CREATE OR REPLACE PROCEDURE NEW_SALARY2
    2 IS
    3 V_SALFROMDBASE NUMBER;
    4 V_NEWVALFROMFUNC NUMBER;
    5
    6 BEGIN
    7 SELECT SAL
    8 INTO V_SALFROMDBASE
    9 FROM EMP
    10 WHERE EMPNO = 7839;
    11
    12 V_NEWVALFROMFUNC := COST_INCREASE_F(V_SALFROMDBASE);
    13
    14 DBMS_OUTPUT.PUT_LINE(V_SALFROMDBASE| |' '| |V_NEWVALFROMFUNC);
    15 END;
    16 /
    Procedure created.
    CODE BLOCK # 3---------------------------
    SQL>DECLARE
    2 V_SALFROMDBASE NUMBER;
    3 V_NEWVALFROMFUNC NUMBER;
    4
    5 BEGIN
    6 SELECT SAL
    7 INTO V_SALFROMDBASE
    8 FROM EMP
    9 WHERE EMPNO = 7839;
    10
    11 V_NEWVALFROMFUNC := COST_INCREASE_F(V_SALFROMDBASE);
    12
    13 DBMS_OUTPUT.PUT_LINE(V_SALFROMDBASE| |' '| |V_NEWVALFROMFUNC);
    14 END;
    15 /
    5000 5250
    PL/SQL procedure successfully completed.
    null

    Follow this steps to run the procedure.
    1. save the procedure in a folder in your hard disk as NEW_SALARY2.SQL.
    2. go to SQL*PLUS and then goto FILE->OPEN
    3. Then goto your folder where you have saved your procedure and then click once(only once) on the procedure name and then click cancel.
    4. Then type SQL>@NEW_SALARY2.SQL;
    it will execute your procedure.
    important: if you don't want to do that then
    type:
    SQL>exec c:\myfolder\NEW_SALARY2.sql
    it will execute your procedure.
    The same applies for your script.
    I hope this will help. If u still need help
    email me at [email protected]
    null

  • Error in calling Stored procedure returns REFCURSOR

    Hi,
    I've written a oracle stored procedure returning REFCURSOR. say,extractorderdespatchconfirmsp('','','','','','H1','ACG','','','','',:rc).
    Following statement throwing error.
    CallableStatement cs = con.PrepareCall("{extractorderdespatchconfirmsp('','','','','','H1','ACG','','','','',:rc)}");
    rs = cs.executeQuery();
    Could you rectify this problem and give me the currect code.
    riyaz

    Your naming convention leaves a little to be desired.
    String command = "{CALL extractorderdespatchconfirmsp(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
    CallableStatement cstmt = conn.prepareCall(command);
    //set the variables here ie, dates need to be a timestamp format. use set timestamp.
    cstmt.setInt(1, 2);
    cstmt.setString(2, "a string");
    cstmt.setInt(3, 0);
    //for return values
    cstmt.registerOutParameter(3, Types.INTEGER);
    cstmt.registerOutParameter(2, Types.INTEGER);
    cstmt.execute();
    int status = cstmt.getInt(3);
    int status2 = cstmt.getInt(2);
    cstmt.close();
    It took me awhile too to get JDBC to call these right.

Maybe you are looking for

  • How do i export text from a pdf?

    I don't know which adobe to purchase in order to export text from a pdf and move it to a spreadsheet.... can someone please help?

  • How to use Script Performance

    Hello, I have two computers, the first I give name infra (for database) and the second is portal (for portal). 1. Where Can i execute the perl loadlogs.pl script in portal or in infra computer to load web cache log files or oc4j log files ? 2. which

  • Web dynpro with XI to connect to R/3

    Hi, I have to develop a WDJ application that connects to R/3. But not directly, it should be through XI. I have ECC6.0 as Backend system. Can anyone throw some light on this. May be steps I should follow for this. Regards Ravindra Edited by: Raveendr

  • 1.6 language change(s) (or (unnecessary) bug fix?)

    Hi Is this rather "Programming" or "JDK"? Something changed for 1.6? That this compiles without problem on 1.5 public class Test {     private abstract interface X {         static abstract class Y {             private abstract class Z {}     privat

  • Keyboard settings are back to front

    keyboard settings are back to front to previous keyboard i had