Calling Stored Procedures through JDBC

Hello!
I would like to implement a call to a stored procedure through JDBC. This call I suppose to embed in JavaBean to import Bean as model.
  A) Shoud this call be implemented inside ordinaly JavaBean or inside EJB?
  B) How can I determine DataSource? Is it possible through JNDI?
  C) Is there any tutorials or examples?
  D) Could anybody give some code texts on this theme?

we use quite a similar architecture here (2 ORACLE DBs, a DB link from one instance to the other). However, we use the db links in functions (not in stored procedures). but a simple select using the db link also works with JDBC. do you use the very same db instances / schemas / users+passwords on all your different test environments? so far, we havent' noticed any problems with ORACLE queries (stored procedures, functions, etc.) that work in sqlplus/worksheet but not with JDBC. do you use the latest ORACLE JDBC drivers (9.2.0.3)?

Similar Messages

  • Weird Problem calling Stored Procedure using JDBC

    Scenario is..
    I have J2EE application and calling stored procedure using JDBC.
    My application connects to instance "A" of testDB.
    Schema "A" does NOT own any packages/procedure but granted execute on oracle packages/procedures that reside in schema "B" of testDB.
    In java code I call procedure(proc1) in package(pac1) which internally calls procedure(proc2) in package(pac2).
    The problem occurs when procedure pac2.proc2 is modified. After the modification, my java code fails and throws an exception "User-Defined Exception" and I am also getting "ORA-06508: PL/SQL: could not find program unit being called". This clears up only if I bounce the web container. (This doesn't happen if I modify pac1.proc1 and run my application)
    Has any one faced this problem? Please suggest if any thing can be changed in jdbc code to fix this problem.
    Thanks

    Hi,
    I assume these are PL/SQL packages and that the changes are made at the package specification level?
    If so, it looks like you are hitting the PL/SQL dependencies rules. In other words, if the spec of proc2 is changed, then proc1 is invalidated, since proc1 still depends on the old version of proc2's spec. As a result, if you try to run proc1, its spec must either be explicitly rewritten before it could run again or implicitly recompiled first, if the (implicit) recompilation fails, it won’t run.
    Kuassi http://db360.blogspot.com

  • How to Call Stored Proc. through JDBC from SQL Server

    I have to call Stored Procedure by JDBC in java. This is the prog i m using:
    import java.sql.*;
    import java.io.*;
    class callSP
    public static void main(String a[]) throws Exception
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection c=DriverManager.getConnection("jdbc:odbc:first","sa","");
    //CallableStatement cs=c.prepareCall("{? =call GET_CLUSTER(?)}");
    CallableStatement cs=c.prepareCall("{call GET_CLUSTER(?)}");
    cs.registerOutParameter(1,Types.CHAR);
    //cs.setString(1, "Teamwork");
    cs.execute();
    //cs.executeUpdate();
    String output=cs.getString(1);
    System.out.println(output);
    catch (SQLException e)
    System.out.println(e);
    This is the Stored Procedure:
    CREATE PROCEDURE GET_CLUSTER
    @Ip_THESAURUS_KEY_WORD CHAR(40)
    AS
    DECLARE @Lc_THESAURUS_CODE INT,
    @Lc_CLUSTER_CODE INT
    BEGIN
    --GET THE THESARUS CODE FOR THE KEYWORD
    SELECT @Lc_THESAURUS_CODE = THESAURUS_CODE
    FROM THESAURUS_LIST
    WHERE THESAURUS_KEY_WORD = @Ip_THESAURUS_KEY_WORD
    --GETTING THE CLUSTER ID
    SELECT @Lc_CLUSTER_CODE = CLUSTER_CODE
    FROM THESAURUS_ENRICH_CLUSTER
    WHERE THESAURUS_CODE = @Lc_THESAURUS_CODE
    --GET THE CLUSTER KEYWORDS
    SELECT THESAURUS_KEY_WORD
    FROM THESAURUS_LIST T,THESAURUS_ENRICH_CLUSTER C
    WHERE T.THESAURUS_CODE=C.THESAURUS_CODE
    AND C.CLUSTER_CODE=@Lc_CLUSTER_CODE AND NOT THESAURUS_KEY_WORD=@Ip_THESAURUS_KEY_WORD
    END
    GO
    Check it out what is problem. Data is not getting, it is giving exception.

    Please be specific regarding the problem that you are facing, that's the key to getting help in the forum. If there's exception in your program, such as NullPointerException or SQLException, please state it in your post.

  • Calling Stored Procedure without JDBC-Adapter

    Hallo,
    as it is not possible calling Stored Procedures with the parameter Typ Record in Oracle my question: It is possible connecting to DB using native java-code for example in Mapping?
    Thanks in advance,
    Frank

    Hi Frank,
    Maybe you can use the DB look up using the JDBC adapter in your mapping.
    Just check this blog for the same,
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    As for calling an Oracle Strored Procedure, it is possible using a RECEIVER JDBC adapter, but not a SENDER JDBC adapter.
    <i> import the jdbc-driver (oracle) in an archive in Designer.</i>
    Also, this imported archive should be under any Namespace, but, it should be in the same SWCV as the one in which the mapping is being executed.
    Regards,
    Bhavesh

  • Creating and calling stored procedure using jdbc

    When I try to create and call a stored procedure using JDBC a very confusing error message about non-existence of the procedure just created is thrown. Using Informix database (IDS 10). Any pointers to point out what am doing wrong would be great!
    Thanks
    import java.io.FileNotFoundException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Scanner;
    public class CreateStoredProc {
    public static void main(String args[]){
    if (0 == args.length)
    return;
    try {
    Class.forName("com.informix.jdbc.IfxDriver");
    Connection conn = DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    } catch (Exception e) {
    e.printStackTrace();
    The stack trace:
    java.sql.SQLException: Routine (runproc) can not be resolved.
    at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3204)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3518)
    at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2353)
    at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2269)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2157)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2132)
    at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:378)
    at com.informix.jdbc.IfxStatement.a(IfxStatement.java:1299)
    at com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1269)
    at com.informix.jdbc.IfxStatement.c(IfxStatement.java:989)
    at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:875)
    at CreateStoredProc.main(CreateStoredProc.java:37)
    Caused by: java.sql.SQLException
    at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:373)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3523)
    ... 10 more

    DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");check with ur sys admin wheather the particular user in the database has >execute privilage(rights) also.i mean execute the SP in the DB level.I guess that a root user will have the enough right.
    String q = " create procedure runproc() "+
    " define i int; "+<" let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);Try to use the following code:
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    q=" execute procedure runproc(); ";
    stmt.execute (q);
    Because maybe the driver failed to precompile your sql once, so that nothing happen.

  • Problem in calling stored Procedure through Toplink

    Hi ,
    I'm doing POC of calling stored thru toplink but facing some issues. Any pointers to it would be helpful.
    This is my javaCode used to call stored proc through toplink:-
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("testdeleteLeafBox");
    call.addNamedInOutputArgumentValue(
    "box_id", // procedure parameter name
    new Integer("1455"), // in argument value
    "box_id", // out argument field name
    Integer.class // Java type corresponding to type returned by procedure
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    Integer metricLength = (Integer) session.executeQuery(query);
    My Stored Procedure is :-
    create or replace procedure testdeleteLeafBox(
    v_box_id IN NUMBER ,
    result OUT number
    is
    v_result number;
    BEGIN
    SELECT client_id INTO v_result FROM tb_gvhr_box WHERE box_id=v_box_id;
    result:=v_result;
    end testdeleteLeafBox;
    Thrown exception is :-
    [TopLink Warning]: 2006.02.24 06:35:47.077--DatabaseSessionImpl(650)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TESTDELETELEAFBOX'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call:BEGIN testdeleteLeafBox(box_id=>?); END;
         bind => [1455 => box_id]
    Query:ValueReadQuery()
    Exception breakpoint occurred at line 1927 of Session.java.
    oracle.toplink.exceptions.DatabaseException: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TESTDELETELEAFBOX'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    The stored procedure defined in the db has one IN and one OUT parameter, therefore in StoredProcedureCall you'll need to have one IN one OUT parameter as well (instead of a single INOUT):
        call.addNamedArgumentValue(
            "v_box_id", //procedure IN parameter name
            new Integer("1455"));
        call.addNamedOutputArgument(
            "result",  //procedure OUT parameter name
            "box_id", // out argument field name
            Integer.class // OUT parameter Java type);

  • Call stored procedure in JDBC passing Array parameters

    Hi all,
    Im trying to call an Oracle Stored Procedure with JDBC. The problem is
    that my parameter is an Array (PL/SQL Type is "Table Of").
    How can i call this procedure by passing right Java parameters to
    the Callable statement ??
    In the Documentation, all samples don't work ! it's possible to
    call a procedure that return Array Type but when we need to pass an Array as
    a parameter we have a DataType exception.
    Any idea ?
    thanx in advance
    Sam.

    Hi Sam,
    I don't have an answer to your question, just some suggestions as to
    where else you may find help.
    Do you know about the "Ask Tom" website:
    http://asktom.oracle.com
    Also, you may find something in the comp.databases.oracle.* newsgroups:
    http://groups.google.com
    I found this article there -- but it's not exactly what you're looking
    for:
    http://groups.google.com/groups?q=array+group:comp.databases.oracle.server+author:Thomas+author:Kyte&hl=iw&as_qdr=w&selm=a9sg06027kf%40drn.newsguy.com&rnum=1
    Good Luck,
    Avi.

  • Calling Stored Procedure from JDBC MSSQL

    Ok, I have a stored procedure on a MsSQL Server 2000 data base. I need to call it to encrypt/decrypt passwords, my problem is when I run it from Query Analyzer it works fine but not in JDBC land. Below I have included my code. I have read you need to use a callable statement, but my query has a proc call embedded in it, not just a proc call. Anyone know how this would be accomplished?
    THanks in Advance
    try {
                   // create an insert query
                   StringBuffer query = new StringBuffer();
                   // add strings and variables to query
                   query.append("INSERT INTO ");
                   query.append("users (Company, FirstName, LastName, Username, ");
                   query.append("Password, Email) ");
                   query.append("values(");
                   query.append("'" + form.getCompany() + "', ");
                   query.append("'" + form.getFirstName() + "', ");
                   query.append("'" + form.getLastName() + "', ");
                   query.append("'" + form.getUsername() + "', ");
                   query.append("dbo.fn_sys_encryptpwd('" + form.getPassword() + "', '" + key + "'), " );
                   query.append("'" + form.getEmail() + "')");
                   // get the datasource from the From the context
                   DataSource dataSource = ResourceLocator.getRCDataSource();
                   // open a connection
                   Connection conn = dataSource.getConnection();
                   // make a statement and execute it
                   CallableStatement statement = conn.prepareCall(query.toString()) ;
                   //Statement statement = conn.createStatement();
                   statement.execute();
                   // Insert has been performed...destroy the statement and connection.
                   statement.close();
                   conn.close();
              }

    I tried with Statement first then I tried with the PreparedStatement, but neither one worked. I have inlcuded part of the stackTrace to give you an idea of my problem
    Thanks
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'dbo.fn_sys_encryptpwd'.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
    Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
    Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(
    Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Sour
    ce)
    at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType
    (Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeInternal(Unknown Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.execute(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(Deleg
    atingPreparedStatement.java:168)
    at com.retailcode.web.data.dao.LoginDAO.createLogin(LoginDAO.java:81)
    at com.retailcode.web.submit.SubmissionServlet.postRegister(SubmissionSe
    rvlet.java:226)
    at com.retailcode.web.submit.SubmissionServlet.doPost(SubmissionServlet.
    java:47)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
    rocessConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
    int.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
    lowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
    ool.java:684)
    at java.lang.Thread.run(Unknown Source)

  • Urgent! Call stored procedure from jdbc vs. call from sqlplus?

    Hello I met a strange problem when using JDBC (to Oracle). I have a stored procedure mypack.myproc, which updates a table (only one row and one column in the table). I found that when I called the procedure directly from sql*plus, like:
    ==========
    BEGIN
    mypack.myproc;
    END;
    ==========
    the value is 2, which is correct.
    However, if I call the procedure from with in java via jdbc, the value become 591 (which is ridiculous), the jdbc call looks like:
    ================
    cstmt = con.prepareCall("{call mypack.myproc}");
    cstmt.executeUpdate();
    con.commit();
    ================
    This is really wield, Any idea?
    Thanks

    Hey buddy, it's you again. Just let you know that you are right. The problem is caused by mis-match between jdbc date and oracle date (that procedure is used to do some date calculation). My co-worker suggested me to add this statement in the procedure, and it did solved problem:
    ================
    DBMS_SESSION.SET_NLS( 'NLS_DATE_FORMAT', '''DD-MON-RRRR''' );
    ================

  • Invalid Object when Calling Stored Procedure from JDBC Adapter

    JDBC Outbound adapter in XI 2.0 connected to SQL Server.  I've coded my mapping to format the XSL mapping properly but the Adapter appears to not be able to find the Stored Procedure.  Error message returned is "Invalid Object spStoredProcedureName".
    Does anybody have any clue as to what I'm missing???

    I know this is trivial, but did you use the "full" name of the SP as <schema>.<procname>???
    HTH

  • Calling stored procedure using jdbc

    Hi all,
    I'm new to jdbc calling pl/sql and I have a very simple question. I'd like to execute this before I read data from the table:
    BEGIN
    packageA.functionA(1234567890123456);
    END;
    My jdbc code:
    try {
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@host", "username", "passwd");
    Statement stmt = conn.createStatement();
    CallableStatement cs = conn.prepareCall ("begin packageA.procedureA (?); end;");
    cs.setBigDecimal(1,new BigDecimal(1234567890123456.0D));
    cs.execute();
    } catch {...}
    I get the following error:
    java.sql.SQLException: ORA-01403: no data found
    ORA-06512: at "db.packageA", line 2639
    ORA-06512: at line 1
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
    Please advise...
    Thanks!
    M

    Hi M,
    as you can see from the error message, you are indeed calling packageA. The error happens on line 2639 of this package, so this is not a JDBC problem.
    Regards,
    Pit

  • Calling Stored Procedure from JDBC Adapter

    Hello,
    I am Updating a SQL Server Table using JDBC Adapter.
    Now I have multiple input rows and the procedure needs to be called for each set.
    Do I need to use multimapping for this or just generating multiple <b>Statement</b> node will solve?
    Also For this will there is any knows/ forseen problem (like Transaction handling) that I need to take care of?
    Thanks and Regards,
    Himadri
    Message was edited by:
            Himadri Chakraborty

    Himadri,
    You can just create multiple statement nodes in one message.
    I am not aware of any known or foreseen issues with this approach.
    Kind regads,
    Koen

  • Calling stored proc through JDBC

    Hello all,
    What I am doing is calling a stored proceedure in this manner...
    CallableStatement stmt = dbB.getConn().prepareCall ("call LDPKG.LDGetData(?, ?)");  //dbB is a conn Class I made, it works fine and getConn obviously jsut returns teh Connection object... Those work fine disreguard them.
    stmt.registerOutParameter(1, <IDONTKNOW>);  //I dont know the return type
    stmt.registerOutParameter(2, <IDONTKNOW>);  //I dont know the return type
    stmt.execute();I am unsure of what to put for the return type... The DB has these TYPES created as teh OUT for the stored Proc ...
    TYPE t_returnId is table of LDDATA.UserId%TYPE index by BINARY_INTEGER
    TYPE t_returnName is table of LDDATA.UserName%TYPE index by BINARY_INTEGER
    I dont know how to translate that return type to Java... Any ideas???
    Thanks!

    If you want the whole thing it is like this... I just didnt see the point in being redundant with the output types. Now that Date is an issue I brought it up. didnt think i needed to before.. sorry.
    OracleCallableStatement stmt = (OracleCallableStatement)dbB.getConn().prepareCall ("begin LDPKG.LDGetData(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); end;");
    stmt.registerIndexTableOutParameter(1,500, OracleTypes.NUMBER, 0);
    stmt.registerIndexTableOutParameter(2,500, OracleTypes.DATE, 0);
    stmt.registerIndexTableOutParameter(3,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(4,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(5,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(6,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(7,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(8,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(9,500, OracleTypes.NUMBER, 0);
    stmt.registerIndexTableOutParameter(10,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(11,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(12,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(13,500, OracleTypes.VARCHAR, 0);
    stmt.registerIndexTableOutParameter(14,500, OracleTypes.VARCHAR, 0);
    stmt.execute();I'm still looking through Google but not finding much about this :(.

  • Calling Stored Procedure with CLOB parameter

    Hi,
    i have one procedure with IN parameter CLOB which is taking xml file and stored in one table column and this table column datatype is also CLOB. And this procedure called by .Net program but problem is when the file will come more than 32KB calling procedure failed. But as i know CLOB can stored up to 4GB data.
    Is that Limitation of oracle or .Net version
    please let me know the solution for that,
    Create Procedure Insert_File(P_XMLFILE IN CLOB)
    as
    begin
    insert into instances
    values(p_xmlfile);
    commit;
    end;
    regards,
    Madan

    Hi Thanks for your reply,
    Actually this procedure called by .net program and the XML file has passed in that parameter which come from some FTP(its inbound) and this files we are storing into above mentioned table.
    Error has come while calling stored procedure Through .net
    Error Details:
    Error calling stored procedure. 0 retry attemps has failed. Error: System.Exception: Error while calling stored procedure on Oracle: INSERT_FILE: System.Data.OracleClient.OracleException: ORA-01460: unimplemented or unreasonable conversion requested

  • Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)

    Hi All,
    We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
    Database is Oracle.
    *Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
    Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
    If both are equal, then
         if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
         else  if the field: 'qq' in YY table equals to "Modify"  then take the data from the view table: 'Modify_View'.
    Finally, We need to archive the selected data from the respective view table.*
    From each table, data will come differently, means with different field names.
    I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
    But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
    Is there any way other than Stored Procedure?
    How to handle Data Types as data is coming from two different tables?
    Can we create one data type for two tables?
    Is BPM required for this to collect data from two different tables?
    Can somebody guide me on how to handle this?
    Waiting eagerly for help which will be rewarded.
    Thanks and Regards,
    Jyothirmayi.

    Hi Gopal,
    Thank you for your reply.
    >Is there any way other than Stored Procedure?
    Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
    I need to select the data from different tables based on some conditions. Let me simplify that.
    Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
    How can we meet this by configuring sender adapter with ATP?
    ================================================================================================
    >How to handle Data Types as data is coming from two different tables?
    If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
    we need to take data only from one table at a time. It is not join of two tables.
    ================================================================================================
    Thanks,
    Jyothirmayi.

Maybe you are looking for

  • How to open a window on click of a button?

    Hi, I want to open a window(a new browser page) on the click of a button.Can anyone please tell me what i should write in the onAction of the button? Regards, Padmalatha.K

  • Posting of p&l accounts in prior periods at go live with wbs

    Hi gurus, As client requirement is to see profit and loss reporting from january in case of may 2014 golive, is there any issue if we post monthly entries of p&l accounts with relevant cost center/wbs with jan to april posting dates and run project s

  • Java and Berkeley XML DB

    Hi, I read that Berkeley XML DB is an XML database which uses the Berkeley DB as the actual storage engine. Berkeley DB itself is available as a binary in either C/C++ or as a 100% Java lib which can nicely be used via maven. Now I had thought, that

  • Installed 10.5.5 - Airport Card is gone

    To preface this post, I just got my laptop back from the Apple Store concerning another issue with my aiport card. I assumed it was fixed and apparently I was wrong. I turned it on today and everything worked beautifully until I installed 10.5.5. Eve

  • Using the Lasso to deselect objects?

    In CS5, I tried to use the lasso tool while holding down the alt command to deselect selected items and it does not seem to work? It works to add objects to a selection when I hold down shift though. Does it not work this way? Thanks.