Testing a Stored Procedure iView gives an error!!

Hi,
I have created a stored procedure iView , associated with a SP object in MSSQL server.Tested the connection etc..everything is works. but when i Preview the SP iview..It gives me an error
"No response from the backend application"
Can u please let me know whats wrong and also let me know incase i missed any step in creating the Iview,
thanks
Glen

Hi,
I have created a stored procedure iView , associated with a SP object in MSSQL server.Tested the connection etc..everything is works. but when i Preview the SP iview..It gives me an error
"No response from the backend application"
Can u please let me know whats wrong and also let me know incase i missed any step in creating the Iview,
thanks
Glen

Similar Messages

  • Calling a stored procedure runs into an error

    Hello,
    We are testing the Database Adapter.
    In our database we created the following
    - Table tt
    - Package ttpackage, with a procedure with 1 input and 1 output parameter which inserts a record in the tt table.
    (see scripts at bottom of message)
    We created a Database Adapter based upon this Package (Call a stored procedure or function) and register this Database Adapter with the Integration Server.
    When we invoke this Database Adapter and enter the input, we can see in the database that 4 records are created. The Web Service returns after a minute with an error
    How can we solve this problem?
    Regards Leon Smiers
    ERROR
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
         at java.util.Vector.get(Vector.java:710)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.readResponseHeader(Unknown Source)
    SCRIPT
    drop table tt
    drop sequence seq_tt;
    drop package ttpackage;
    create table tt
    (field1 number(10) not null
    ,field2 varchar2(25) not null
    ,status varchar2(1) not null
    ,primary key (field1)
    create sequence seq_tt;
    create or replace package ttpackage is
    procedure insert_tt(
    pi_field2 in tt.field2%type,
    po_status out klacht_data.status%type);
    end;
    show errors
    create or replace package body ttpackage is
    procedure insert_tt(
    pi_field2 in tt.field2%type,
    po_status out klacht_data.status%type) is
    begin
    po_status:='I';
    insert into tt
    (field1, field2,status)
    values(seq_tt.nextval,pi_field2,po_status);
    end insert_tt;
    end;
    show errors
    /

    Hello Dave,
    Thanks for the quick fix.
    I've tested the fix. The 'Array index out of range: 0' disappeared.
    I get, unfortunately, the following error. I already described the steps I take in the first message. Based upon the TTpackage I create a Database adapter, register it with the ESB and invoke the URL from the ESB.
    Regards Leon
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.xml.parser.v2.XMLDOMException: Ongeldige naamruimte http://xmlns.oracle.com/pcbpel/adapter/db/OCOP/TTPACKAGE/INSERT_TT/ voor prefix xmlns
         at oracle.xml.parser.v2.XMLElement.setAttributeNS(XMLElement.java:1015)
         at oracle.tip.esb.utils.DOMUtil.copyContentsTo(Unknown Source)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(Unknown Source)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(Unknown Source)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:869)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:460)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    </faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>

  • While executing java stored procedure i got an error

    I have used this command to load java source into data base
    loadjava -user ENCORA/ENCORA C:\framework\Packages\testdevelopement\HOST.java
    but while executing i got an error.
    SQL> create or replace function run_cmd(p_cmd in varchar2) return number
    2 as
    3 language java
    4 name 'HOST.RunThis(java.lang.String[]) return integer';
    5 /
    Function created.
    SQL> create or replace procedure RC(p_cmd in varchar2)
    2 as
    3 x number;
    4 begin
    5 x := run_cmd(p_cmd);
    6 end;
    7 /
    Procedure created.
    SQL> set serveroutput on size 1000000
    SQL> exec dbms_java.set_output(1000000)
    PL/SQL procedure successfully completed.
    SQL> exec rc('/usr/bin/ps -ef');
    BEGIN rc('/usr/bin/ps -ef'); END;
    ERROR at line 1:
    ORA-29540: class HOST does not exist
    ORA-06512: at "ENCORA.RUN_CMD", line 0
    ORA-06512: at "ENCORA.RC", line 5
    ORA-06512: at line 1
    can any one suggest me how can i resolve this problem?

    Hi Uday,
    My guess is that there is a problem with your java stored procedure that is causing the "ExceptionInInitializer" error to be thrown. According to the javadoc:
    is thrown to indicate that an exception occurred during
    evaluation of a static initializer or
    the initializer for a static variable
    Since I didn't see any of your code in your post, I can't help you much more, I'm afraid. Perhaps if you would provide some more details, I may be able to help you some more. I think the following details would be helpful:
    1. Complete error message and stack trace you are getting.
    2. The section of your java code that you think is causing the problem.
    3. Oracle database version you are using.
    Good Luck,
    Avi.

  • Stored Procedure Call from Bean Error - PLS-00201

              Hello all,
              I am using the java stored procedure code in the examples dir of weblogic51/examples/jdbc/...
              with one exception. I created the stored procedure as another user with more
              permissions than
              the user that the jdbc connection will be established with. I created a public
              synonym so the stored
              procedure doesn't have to be refered to as "username.proc_squareInt". I keep
              getting the following
              errors. The web user has execute permissions and I tried calling it both with
              the owner.proc_name
              and proc_name (which I know won't work since it won't be able to find it).
              Any help would be greatly appreciated.
              Sincerely,
              Michael Prinsen
              Tue Jul 17 13:47:41 MDT 2001:<E> <WebAppServletContext-et> Root cause of ServletException
              java.sql.SQLException: ORA-06550: line 1, column 7:
              PLS-00201: identifier 'WTHDBM.PROC_SQUAREINT' must be declared
              ORA-06550: line 1, column 7:
              PL/SQL: Statement ignored
                   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
                   at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
                   at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
                   at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
                   at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
                   at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
                   at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
                   at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
                   at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
                   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1807)
                   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:332)
                   at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:376)
                   at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
                   at csu.et.testBean.getWeatherData1(testBean.java:46)
                   at jsp_servlet._test._tester._jspService(_tester.java:107)
                   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
                   at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
                   at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
                   at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              // START CODE
              package csu.et;
              import java.io.*;
              import java.sql.*;
              import java.util.*;
              import java.text.*;
              import java.beans.*;
              import java.math.*;
              import java.util.Date;
              import java.util.Locale;
              import csu.util.*;
              public class testBean {
              public String getWeatherData1() throws SQLException {
              Connection conn = null;
              conn = CSUConnection.getConnection("etSelectConnectionPool");
              // Create a stored proc - (CREATED ALREADY)
              // Statement stmt1 = conn.createStatement();
              // stmt1.execute("CREATE OR REPLACE PROCEDURE proc_squareInt " +
              // "(field1 IN OUT INTEGER, " +
              // " field2 OUT INTEGER) IS " +
              // "BEGIN field2 := field1 * field1; " +
              // "field1 := field1 * field1; END proc_squareInt;");
              // stmt1.close();
              String sql = "{call proc_squareInt(?, ?)}";
              CallableStatement cstmt1 = conn.prepareCall(sql);
              cstmt1.registerOutParameter(2, java.sql.Types.INTEGER);
              for (int i = 0; i < 5; i++) {
              cstmt1.setInt(1, i);
              cstmt1.execute();
              System.out.println(i + " " + cstmt1.getInt(1) + " " + cstmt1.getInt(2));
              cstmt1.close();
              conn.close();
              return("hard-coded stuff");
              //END CODE
              

    this is probably an oracle related issue, and has very little to do with
              Weblogic transactions.
              your easiest way to debug this is to open a SQL/Plus window, log in as user
              WTHDBM and try to run the command
              "execute proc_squareInt(5,5);"
              "execute owner.proc_squareInt(5,5);"
              if this doesn't work, consult Oracle technet on how to setup synonyms and
              permissions
              Filip
              ~
              Namaste - I bow to the divine in you
              ~
              Filip Hanik
              Software Architect
              [email protected]
              www.filip.net
              "Michael Prinsen" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hello all,
              >
              > I am using the java stored procedure code in the examples dir of
              weblogic51/examples/jdbc/...
              > with one exception. I created the stored procedure as another user with
              more
              > permissions than
              > the user that the jdbc connection will be established with. I created a
              public
              > synonym so the stored
              > procedure doesn't have to be refered to as "username.proc_squareInt". I
              keep
              > getting the following
              > errors. The web user has execute permissions and I tried calling it both
              with
              > the owner.proc_name
              > and proc_name (which I know won't work since it won't be able to find it).
              >
              > Any help would be greatly appreciated.
              >
              > Sincerely,
              >
              > Michael Prinsen
              >
              > Tue Jul 17 13:47:41 MDT 2001:<E> <WebAppServletContext-et> Root cause of
              ServletException
              > java.sql.SQLException: ORA-06550: line 1, column 7:
              > PLS-00201: identifier 'WTHDBM.PROC_SQUAREINT' must be declared
              > ORA-06550: line 1, column 7:
              > PL/SQL: Statement ignored
              >
              > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
              > at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
              > at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
              > at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
              > at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
              > at
              oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313
              > at
              oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
              > at
              oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1
              353)
              > at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
              > at
              oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
              :1807)
              > at
              oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
              ment.java:332)
              > at
              oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.j
              ava:376)
              > at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
              > at csu.et.testBean.getWeatherData1(testBean.java:46)
              > at jsp_servlet._test._tester._jspService(_tester.java:107)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :120)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :138)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:915)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:879)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:269)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
              > at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              >
              >
              >
              > // START CODE
              >
              > package csu.et;
              >
              > import java.io.*;
              > import java.sql.*;
              > import java.util.*;
              > import java.text.*;
              > import java.beans.*;
              > import java.math.*;
              > import java.util.Date;
              > import java.util.Locale;
              > import csu.util.*;
              >
              > public class testBean {
              >
              > public String getWeatherData1() throws SQLException
              >
              > Connection conn = null;
              > conn = CSUConnection.getConnection("etSelectConnectionPool");
              >
              > // Create a stored proc - (CREATED ALREADY)
              > // Statement stmt1 = conn.createStatement();
              > // stmt1.execute("CREATE OR REPLACE PROCEDURE proc_squareInt " +
              > // "(field1 IN OUT INTEGER, " +
              > // " field2 OUT INTEGER) IS " +
              > // "BEGIN field2 := field1 * field1; " +
              > // "field1 := field1 * field1; END proc_squareInt;");
              > // stmt1.close();
              >
              > String sql = "{call proc_squareInt(?, ?)}";
              > CallableStatement cstmt1 = conn.prepareCall(sql);
              >
              > cstmt1.registerOutParameter(2, java.sql.Types.INTEGER);
              > for (int i = 0; i < 5; i++) {
              > cstmt1.setInt(1, i);
              > cstmt1.execute();
              > System.out.println(i + " " + cstmt1.getInt(1) + " " +
              cstmt1.getInt(2));
              > }
              >
              > cstmt1.close();
              > conn.close();
              > return("hard-coded stuff");
              > }
              >
              > }
              >
              > file://END CODE
              

  • Testing JDBC - Stored Procedure

    Hi,
    We're working on creating a new JDBC in weblogic server 11g. The data source is created and we have a business service, which was built based on a jca built in JDeveloper. When testing the connection between the server and the db, it seems to be working as expected, but when the business service is executed, which is supposed to executed a stored procedure in the db, nothing is returned even though it should.
    Is there any way to verify whether the business service is executing the stored procedure or not?

    Can you do any of these:
    1 - turn on WebLogic debugging for JDBCSQL, to log all/most JDBC Calls.
    2 - edit the procedure in the DBMS to verify/log when it is called, whether
    it does anything else or not?
    3 - turn on DBMS tracing to log what clients are doing?
    4 - set up/turn on the driver debug logging?
    Depending on the WebLogic version and driver version these may
    be done in different ways, and the instructions are not appropriate
    to all copy here, so I would open a support SR to get help if/as you need it.

  • Stored procedure - insert clob obj - error msg: ORA-01460: unimplemented

    Hi all,
    I have a situation where I want to insert a clob object to my local table via a stored procedure. The clob object stores large amount of text. The clob data is populated from retrieving content in an external text file. When executing an insert statement in c# code, the information was inserted successfully. when executing the stored procedure to insert the information, i always get "ORA-01460: unimplemented or unreasonable conversion requested". I use ReadToEnd() from StreamReader class to retrieve the context of the external text file. Does anyone know why Oracle behaves this way? Thanks for helping in advance.
    TABLE DEFINITION FOR CLOB_TEST
    Name       Type         Nullable Default Comments
    PKG_NAME   VARCHAR2(50) Y                        
    PKG_DESC   CLOB         Y                        
    PKG_FAM_ID NUMBER       Y                        
    STORED PROCEDURE
    procedure InsertTempReleaseTable(p_name        in varchar2,
                                       p_description in clob,
                                       p_fam_id      number) is
      begin
        insert into clob_test
          (pkg_name, pkg_desc, pkg_fam_id)
        values
          (p_name, p_description, p_fam_id);
      end InsertTempReleaseTable;
    RETRIEVE CONTENT FROM A TEXT FILE
    public string GetTextFileContents(string path)
                using (StreamReader sr = new StreamReader(path))
                      return (sr.ReadToEnd());
    C# INVOKE STORED PROCEDURE TO INSERT
    using (OracleCommand cmd = (OracleCommand)database.GetStoredProcCommand("pkg_sptbuildstatus.InsertTempReleaseTable"))
                    cmd.Parameters.Add("p_name", OracleType.VarChar, 255).Value = obj.PackageName;  // string  
                    cmd.Parameters.Add("p_description", OracleType.Clob).Value = obj.ChangeDescription; // string
                    cmd.Parameters.Add("p_fam_id", OracleType.Number).Value = obj.FamilyId; // int
                    database.ExecuteNonQuery(cmd);
                }Edited by: user8976335 on Jan 11, 2010 4:28 PM
    Edited by: user8976335 on Jan 11, 2010 4:59 PM
    Edited by: user8976335 on Jan 11, 2010 4:59 PM
    Edited by: user8976335 on Jan 12, 2010 10:48 AM

    It's possible it doesn't like the name of your variables (being the same as the table), it's good practice to not do that.
    Much better would be.
    procedure InsertTempReleaseTable
       p_name in varchar2,
       p_description in clob,
       p_fam_id number
    is
    begin
       insert into clob_test
          (name, description, fam_id)
       values
          (p_name, p_description, p_fam_id);
    end InsertTempReleaseTable;Your Oracle version is typically of immense help.
    select * from v$version;Also, using the tags will keep the formatting of your code.
    If this isn't any help, can you post a working example of your example ? Where the code breaks (which call).
    Edited by: Tubby on Jan 11, 2010 3:50 PM
    Edited by: Tubby on Jan 11, 2010 3:51 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Stored procedure which returns date error

    if have a function getGmtDate in the package pa which uses a date as parameter and returns a date
    conn.Connect()
    strSQL = "pa.getGmtDate"
    P_RETURN As New OracleParameter(":pRETURN", OracleDbType.Date, ParameterDirection.ReturnValue)
    Dim P_DATE As New OracleParameter(":pDATE", OracleDbType.Date, 0, ParameterDirection.Input)
    P_DATE.Value = Now 'current date
    Dim cmd As New OracleCommand(strSQL, conn.getConnection)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.Add(P_RETURN)
    cmd.Parameters.Add(P_DATE)
    cmd.ExecuteNonQuery()
    dim returnValue as Date = P_RETURN.Value
    and the date is retrieved correct from the db, but when I want to bind the resultdate to a variable then it throws an exception:
    Cast from type 'OracleDate' to type 'Date' is not valid
    can anyone help me?

    1) Create CallableStatement
    2) For each of returning value you have to call RegisterOutParameter()
    3) For others user setXXX() method depending on type of parameter
    4) call
    5) use vars registered through RegisterOutParameter() - all your values should be there
    Pavel

  • Error executing Stored Procedure that returns a recordset in Visual Basic 6

    Hello, i tried to use the example in the link posted as a response to my question in a previous thread, and in Visual Basic 6, when i execute the Stored procedure it gives me the following error:
    This is the package created as indicated in the example FAQ you posted.
    package types
    as
    type cursorType is ref cursor;
    end;
    This is the procedure created as indicated in the example FAQ you posted.
    PROCEDURE SP_TITUVALO(T_BR IN VARCHAR2,
    P_Cursor OUT TYPES.cursorType )
    AS
    BEGIN
    OPEN P_Cursor FOR
    SELECT * FROM TASAS WHERE BR=T_BR AND TASA > 0;
    END;
    This is the code used to execute the Stored Procedure in VB6:
    Dim objConn As New ADODB.Connection
    Dim connString
    Dim cmdStoredProc As New ADODB.Command
    Dim param1 As New ADODB.Parameter
    Dim RS As ADODB.Recordset
    Set param1 = cmdStoredProc.CreateParameter("T_BR", adVarChar, adParamInput, 255, "97")
    cmdStoredProc.Parameters.Append param1
    objConn.Open strconex
    Set cmdStoredProc.ActiveConnection = objConn
    cmdStoredProc.CommandText = "SP_TITUVALO"
    cmdStoredProc.CommandType = adCmdStoredProc
    Set RS = cmdStoredProc.Execute
    This is the error returned:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'SP_TITUVALO'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ****************************************************************

    Juan,
    Not sure about FAQ you are referring to, but it seems that you need to set PLSQLRSet property of ADODB.Command to TRUE. Because if you fail to do so - errors with refcursors are likely to happen.
    Consider:
    Set objConn = CreateObject("ADODB.Connection")
    objConn.ConnectionString = "Provider=OraOLEDB.Oracle;Persist Security Info=False;Data Source=test9ora;User ID=max;Password=blabla"
    objConn.Open
    'Dim cmdStoredProc
    Set cmdStoredProc = CreateObject("ADODB.Command")
    Dim param1
    Set param1 = cmdStoredProc.CreateParameter("T_BR", adVarChar, adParamInput, 255, "97")
    param1.Value = "X"
    cmdStoredProc.Parameters.Append param1
    'Dim RS
    Set cmdStoredProc.ActiveConnection = objConn
    'The following line was missed out
    cmdStoredProc.Properties("PLSQLRSet") = True
    cmdStoredProc.CommandText = "SP_TITUVALO"
    cmdStoredProc.CommandType = adCmdStoredProc
    Set RS = cmdStoredProc.ExecuteThis works fine, at least for me.
    Cheers.

  • Bea type 4 db2 driver-stored procedure error

    Iam creating a connection pool in weblogic 9.2 MP2
    using bea type 4 db2 driver and excuting a stored procedure.Iam getting following error
    I enabled spy
    spy(2008/02/13 09:41:58.050)>> Driver Name = DB2
    spy(2008/02/13 09:41:58.050)>> Driver Version = 3.60.24 (023731.010811.022315)
    spy(2008/02/13 09:41:58.050)>> Database Name = DB2/MVS
    spy(2008/02/13 09:41:58.050)>> Database Version = 8.1.5
    spy(2008/02/13 09:44:11.063)>> java.sql.SQLException: [BEA][DB2 JDBC Driver][DB2]UNACCEPTABLE SQL STATEMENT ErrorCode=-84 SQL
    State=42612
    The code is using
    CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    as follows
    String sql = "CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    myCallableStmt = con.prepareCall(sql);
    is ther are any issues in calling stored procedure with type 4 bea db2 driver.
    connectrion pool details
    jdbc:bea:db2://server:447
    weblogic.jdbc.db2.DB2Driver
    user=user
    LocationName=server
    portNumber=447
    serverName=host
    batchPerformanceWorkaround=true
    The code is working fine with type 2 ibm driver connection pool
    Also Iam trying with ibm type 4 driver
    Iam getting following error in configuration itself
    <Feb 13, 2008 11:18:44 AM EST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM
    abc.xy_def" set up for pool "DataSourceIBM" failed with exception: "com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -725,
    SQLSTATE: 42721, SQLERRMC: CLIENT APPLNAME;server".>
    details
    jdbc:db2://mvsavt1_vipa.corpny.csfb.com:447/server
    com.ibm.db2.jcc.DB2Driver
    user=user
    locationName=server
    portNumber=450
    drivertype=4
    Any configuration required at db2 server

    Ok, Odd. Please email this post (the code below) and the
    output of each to [email protected] and ask them to investigate
    why one driver finds the procedure and the other doesn't.
    This will get back to me officially, and then I will be able
    to enlist all the resources to debug it. Is the stored
    procedure owned by the same schema as your 'user'?
    Mohamed Rabbani P M wrote:
    Joe,
    It is the same code you gave
    BEA Driver Code
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import java.sql.*;
    import weblogic.common.*;
    public class dddb2
    public static void main(String argv[])
    throws Exception
    Connection c = null;
    try
    java.util.Properties props = new java.util.Properties();
    Driver d = (Driver)Class.forName("weblogic.jdbc.db2.DB2Driver").newInstance();
    props.put("user", "user");
    props.put("password", "password");
    props.put("locationName", "dbserver");
    String URL = "jdbc:bea:db2://dbhost:447";
    c = d.connect(URL, props);
    DatabaseMetaData dm = c.getMetaData();
    System.out.println(dm.getDriverVersion());
    System.out.println("Database version is " + dm.getDatabaseProductVersion() );
    CallableStatement p = c.prepareCall("{ CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }");
    p.setInt(1,1234);
    p.setString(2,"XYZ");
    p.setString(3,"XYZ");
    p.setInt(5,1234);
    p.setString(6,"");
    p.setString(7,"XYZ");
    p.setString(9,"XYZ");
    p.setString(12,"XYZ");
    p.registerOutParameter(4,Types.INTEGER);
    p.registerOutParameter(8,Types.INTEGER);
    p.registerOutParameter(10,Types.INTEGER);
    p.registerOutParameter(11,Types.INTEGER);
    p.registerOutParameter(13,Types.INTEGER);
    p.setFetchSize(3);
    p.execute();
    catch (Exception e)
    { e.printStackTrace(); }
    finally
    { try {c.close();}catch (Exception e){} }
    IBM Driver Code
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import java.sql.*;
    import weblogic.common.*;
    public class dddb2ibm
    public static void main(String argv[])
    throws Exception
    Connection c = null;
    try
    java.util.Properties props = new java.util.Properties();
    Driver d = (Driver)Class.forName("com.ibm.db2.jcc.DB2Driver").newInstance();
    props.put("user", "user");
    props.put("password", "password");
    //props.put("databaseName", "dbserver");
    String URL = "jdbc:db2://dbhost:447/dbserver";
    c = d.connect(URL, props);
    DatabaseMetaData dm = c.getMetaData();
    System.out.println(dm.getDriverVersion());
    System.out.println("Database version is " + dm.getDatabaseProductVersion() );
    CallableStatement p = c.prepareCall("{ CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }");
    p.setInt(1,1234);
    p.setString(2,"XYZ");
    p.setString(3,"XYZ");
    p.setInt(5,1234);
    p.setString(6,"");
    p.setString(7,"XYZ");
    p.setString(9,"XYZ");
    p.setString(12,"XYZ");
    p.registerOutParameter(4,Types.INTEGER);
    p.registerOutParameter(8,Types.INTEGER);
    p.registerOutParameter(10,Types.INTEGER);
    p.registerOutParameter(11,Types.INTEGER);
    p.registerOutParameter(13,Types.INTEGER);
    p.setFetchSize(3);
    p.execute();
    catch (Exception e)
    { e.printStackTrace(); }
    finally
    { try {c.close();}catch (Exception e){} }

  • Oracle stored procedure works in toad but lots of error in java

    I've tested this stored procedure in toad 7.3 and it completes ok.
    I do pass the same IN parameters and OUT parameters.
    I registered the out parameter as a OracleTypes.CURSOR
    if it works in toad or pl/sql, what is wrong? how can this be fixed.
    however, when i execute this in java, this is the exception and garbage i receive:
    java.sql.SQLException: ORA-06550: line 1, column 22:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    := . ( @ % ;
    The symbol "(" was substituted for "" to continue.
    ORA-06550: line 1, column 33:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( ) , * @ % & | = - + < / > at in mod not range rem => ..
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    between is null is not || indicator is
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    my stored procedure is as follows:
    CREATE OR REPLACE PROCEDURE getUserByLogin (
    arg_subscriptionName IN varchar,
    arg_loginName IN varchar,
    arg_password IN varchar,
    arg_rec_userinfo_valLanguage OUT types.rec_userinfo_valLanguage
    ) AS
    var_userNum int;
    BEGIN
    select
    u.userNum into var_userNum
    from
    userInfo u,
    subscription s
    where
    s.subscriptionName = arg_subscriptionName AND
    s.subscriptionNum = u.subscriptionNum AND
    u.loginName = arg_loginName AND
    u.password = arg_password;
    if (var_userNum is null) then
    var_userNum := 0;
    end if;
    getUser(var_userNum, arg_rec_userinfo_valLanguage);
    END;
    /

    I'm using a callable statement.
    The strange thing is that, when i remove all IN and OUT paramters in the java code and the stored procedure, both the call to the stored procedure and teh execution of the stored procedure works.
    The moment I add in just a IN parameter (in the stored procedure, and setting it in the java code) it stops working, and i receive this error.
    java.sql.SQLException: ORA-06550: line 1, column 23:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    := . ( @ % ;
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    heres the java code and stored procedure
    CREATE OR REPLACE PROCEDURE sampleProcedure(tax out number)
    is
    BEGIN
    tax := 10 *.15;
    /END;
    CallableStatement statement =conn.prepareCall("{call sampleprocedure ?}");
    statement.registerOutParameter(1,java.sql.Types.INTEGER);
    statement.execute();
    ResultSet rs = statement.getResultSet();
    if((rs = statement.getResultSet()) != null){

  • Testing stored procedure using sql plus

    I'm attempt to create and test a stored procedure in sql plus.
    I enter:
    create procedure sp_getconfiguration(mygroup in char, myparameter in char, myvalue in out char) as begin select configvalue into myvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter; end;/
    I get a procedure created. response by when I type:
    variable myval char
    call sp_getconfiguration('Language','Enabled', myval);
    I get the following error:
    error at line 1:
    ora-06576: not a valid function or procedure name
    I can go into DBA studio and see the procedure listed and can compile it and it says "valid". I have tried granting execute permission to public and trying it again under sql plus and nothing seems to help.
    I'm also attempting to run this same procedure from VB and get an invalid column name error from there.
    Thanks for any help in advance.
    Lee

    Thanks for all your help. What I actually called product support and they helped me solve it. But what I found out is that if using oracle 8.1.# you have to invoke the stored procedure without the "call " in front of the procedure name. For instance.
    sp_getconfiguation()
    In version 9.# it appears that you use the call in front of the procedure. Dah! So if anyone else is having this problem. That is the solution. Thanks anyway.

  • SSRS Calling a Stored Procedure error : PLS-00306: wrong number or types of arg...

    Hi,
    My Problem is when im adding dataset with stored procedure, im getting this error.
    I Can access database, 
    Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct.
    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PROCEDURE_NAME' ORA-06550: line 1, column 7: PL/SQL:
    Statement ignored
    stored procedure is simple select :
    CREATE OR REPLACE PROCEDURE [PROCEDURE_NAME](L_CURSOR out SYS_REFCURSOR)
    is
    Begin
    open L_CURSOR for
    SELECT [columnname] FROM
    [tablename]
    End;
    Configuration Details:
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biOracle Developer Tools for Visual Studio Copyright (c) 2005,2014 SQL Server Data Tools Type: Oracle , Data Provider : .Net Framework Data Provider For Oracle

    The answer is of inside question. It is about provider. Change my provider ODTwithODAC for 10g (my database version). And problem resolved.
    Thank you for your helps,
    Regards,
    Arda

  • Error while parsing Stored Procedure

    Hi all,
    i try to migrate a MS SQL Server 2000 database to Oracle 9.2 with the Migration Workbench and got into trouble with some Stored Procedures, that contain LEFT JOINS on SELECT-Statements. While parsing the following example Stored Procedure sp_test, an parse-error occurs (ENCOUNTERED: LEFT):
    CREATE PROCEDURE [dbo].[sp_test]
    AS
    SELECT
    FROM
    tbl_Test1 AS test1
    LEFT JOIN (Select * From tbl_Test2 Where column1 IS NOT NULL) AS test2 ON test1.test2_id = test2.id
    GO
    If i run this command in SQL-Worksheet, the SP is created correctly.
    If i modify the SP as it follows, no parse-error-occurs:
    CREATE PROCEDURE [dbo].[sp_test]
    AS
    SELECT
    FROM
    tbl_Test1 AS test1
    LEFT JOIN tbl_Test2 AS test2 ON test1.test2_id = test2.id
    GO
    Is it a bug?
    Thank you for help,
    Torsten

    Hi Torsten,
    This has been logged as a bug      3635749.
    There are no plans to fix this in the current release of the OMWB.
    But the next release of the OMWB should cope with this issue.
    Im afraid the workaround is to comment out the offending statement in the Source Model and reparse it to the Oracle Model. In the Oracle Model you will have to remove the comment and manually migrate the statement yourself.
    Regards,
    Dermot.

  • Collaboration Room iViews give error -- Database related errors -- Pls Help

    Hello Everyone,
    We are on EP 6.0 SP 17 (Netweaver 2004).
    KMC component was installed separately (Deployed manually).
    We are trying to create simple Collaboration Rooms and we are facing some issues with the same.
    I am following the documentation on SAP Help for the Room Creation:
    Help &#61664; SAP Netweaver 2004 &#61664; People Integration &#61664; Collaboration &#61664; Administration Guide
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/3d59fdaa5ebb45967ea107d3fa117a/frameset.htm
    We are able to create rooms based on pre-defined templates and we are also able to add members to rooms, send/receive the invitation emails. I am able to work with Instant Messaging also.
    But the problem is that some of the iViews related to Collaboration Rooms are giving errors.
    1.<b> “Discussion” iView gives an error saying “You do not have access permission” (even the user has all the necessary roles assigned).</b>
    Log for this error is as follows:
    Exception ID = 90c3315f-c29d-2910-87ac-806aa372da7f com.sapportals.wdf.WdfError     at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:678)at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
         at com.sapportals.htmlb.Container.preRender(Container.java:120)
         at com.sapportals.htmlb.Container.preRender(Container.java:120)
         at com.sapportals.htmlb.Container.preRender(Container.java:120) ……….
    --- Nested WDF Exception -
    com.sapportals.wcm.WcmException: The SQL statement "INSERT INTO "KMC_URIMAPPER" ("HASH_KEY","EXTERNAL_KEY","CONST_INTERNAL","VAR_INTERNAL","EK_PREFIX","EKHK00","EKHK01","EKHK02","EKHK03","EKHK04","EKHK05","EKHK06","EKHK07","EKHK08","EKHK09","EKHK10","EKHK11","EKHK12","EKHK13","EKHK14") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" contains the semantics error[s]: column "EK_PREFIX" not in any scope
    I tried to change the permissions of the “Discussion” iView, but it did not work either.
    2. <b>Some iViews like “Room Information” throw a Runtime Error as follows:</b>
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : pcd:portal_content/com.sap.ip.collaboration/RoomPartContent/Generic/Pages/com.sap.netweaver.coll.RoomDiscussionPage/com.sap.netweaver.coll.RoomInformationExtended
    Component Name : com.sap.netweaver.coll.appl.ui.room.RoomInformation
    The exception was logged. Inform your system administrator..
    Exception id: 02:17_02/02/07_0006_213711350
    See the details for the exception ID in the log file
    <b>I have figured out that the following error message is common in most or the error messages:
    The SQL statement "INSERT INTO "KMC_URIMAPPER" ("HASH_KEY","EXTERNAL_KEY","CONST_INTERNAL","VAR_INTERNAL","EK_PREFIX","EKHK00","EKHK01","EKHK02","EKHK03","EKHK04","EKHK05","EKHK06","EKHK07","EKHK08","EKHK09","EKHK10","EKHK11","EKHK12","EKHK13","EKHK14") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" contains the semantics error[s]: column "EK_PREFIX" not in any scope</b>
    Are there any database related configurations required for making the Collaboration Room Discussion functionality work properly?
    Are there any KM related configurations necessary other than those mentioned in the document I am referring to?
    Are there any database related configurations that are required?
    I would really appreciate any help in this matter. Please advise me about any ideas you may have?
    Thanks,
    Raj Seelam

    Hello Lars,
    First of all thank you for your reply.
    <b>do u use Collaboration first time?</b>
    Yes, we just started using Collaboration and this is our first requirement.
    <b>Which roles do u have?</b>
    I have all the required roles (Super Admin, Content Management, Collaboration, Collaboration Room Creation).
    I know that these features are available in NW04 SP 17 without any limitations. I have reviewed SAP Notes 707730, 711093, 709354 and 946470 also.
    This problem is with only a few Collaboration iViews.
    I am able to create Rooms, Enter Rooms, Receive Invitation e-mails without any problem.
    Any suggestions about any possible missing configurations ?
    Thanks Again,
    Raj

  • MySQL Stored Procedure got error in Crystal Reports 9

    Hi,
    I am using MySQL Server 6.0 and mysqlyog and Crystal Reports 9 and ODBC 3.5 and ODBC 5.1. When I create report in CR9 using wizard, I always got an error message "CRW32.exe has encountered problem and needs to be close. bla bla bla..."
    But when I try my odbc connection (DSN) to link in ms access i successfully see the records.
    I also use MS SQL stored procedure in crystal 9 but i got no problem encountered. the only difference is I use OLE DB connection.
    Can any one can tell or explain why an erro message always comes out?

    hi,
    Fields in Stored Procedure does not appear.
    I am now using crystal reports 2008 evaluation copy for 30 days. I am trying to create a stored procedure with parameter, here is my sample Stored Procedure code;
    DELIMITER $$
    DROP PROCEDURE IF EXISTS `puerto`.`SP_FindEmployees`$$
    CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_FindEmployees`(SIDNo VARCHAR(10))
    BEGIN
         SELECT * FROM employees WHERE IDNo=SIDNo;
        END$$
    DELIMITER ;
    when i try to call the procedure in sqlyog here is my sample code;
    CALL sp_findemployees('0000000001')
    it is successfull, but when i try to  connect it with crystal reports 2008 I got no fields in my stored procedure andi got this error message ;
    "Database Connector: 'HY00:[MySQL][ODBC 3.51 Driver][mysqld-5.1.33-community]incorect number of arguments for procedure puerto.sp_findemployees; expected 1, got 0 [Database vendor code: 1318]"
    CR2008 was not asking a parameter values.
    But when I try using stored procedure that i've made in MSSQL, CR2008 asking parameters and succefully created the reports needed.
    My Objective is to make a stored procedure  in MySQL by using select statement and filter it with parameter(s) that I will pass and CR2008 will use this stored procedure.
    i also try the view with this code below and it was successfull in CR2008.
    DELIMITER $$
    DROP VIEW IF EXISTS `puerto`.`ep_employees`$$
    CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ep_employees` AS (SELECT `employees`.`IDNo` AS `IDNo`,`employees`.`FullName` AS `FullName` FROM `employees`)$$
    DELIMITER ;

Maybe you are looking for