Problem while using oracle stored procedure in VC

Hi All,
I have created JDBC system and connected my locally installed Oracle data base to the VC.  I mapped the data base user to my VC user. I tested connection and it is fine. Further I see the DB alias in Visual Composer and I can drop stored procedures to my story board. I can define parameters, but when I am executing procedures I get the error message.
Problem: I can not execute stored procedures stored in Oracle data base. Error Message: Portal request failed. Could not execute stored procedure.
In the stored procedure, I have used select query, that returns set of records, so that  I have used  REF CURSOR as OUT Parameter. Is REF CURSOR supported by VC?. Else, any  tricks available to solve this problem?.
Note: Stored Procedure of Sql server is working fine in VC.
Thanks,
Venkatesh R

Returning (or sending in) multiple rows directly from (or to) a stored procedure is not currently possible. I have been in contact with SAP on this subject earlier, and they suggest using a web service to do the job. I used this as a work around, calling the stored procedure from a web service. I send in VC tables to this web service, and this in turn contacts my stored procedure.
The problem is related to the connector framework in the J2EE environment.
I am on 7.0 sps 17
If you use stored procedure single value parameters of type varchar, number ... then VC has no problem communicating with your procedures.
Good luck
Henning Strand

Similar Messages

  • Oracle error while using an stored procedure in forms

    Hi all,
    I used a stored procedure in a form,and it worked well.Recently i just update this procedure by desactivate some codes lines.The stored proc is well compile but when i try to use it in a form module, the following Oracle error occurs:
    ORA-04020     deadlock detected while trying to lock object name
    Cause:     While trying to lock a library object, a deadlock is detected.
    If some one have a solution to this problem, plz react to this topic
    TYAG.

    Hi all,
    I used a stored procedure in a form,and it worked well.Recently i just update this procedure by desactivate some codes lines.The stored proc is well compile but when i try to use it in a form module, the following Oracle error occurs:
    ORA-04020 deadlock detected while trying to lock object name
    Cause: While trying to lock a library object, a deadlock is detected.
    If some one have a solution to this problem, plz react to this topic
    TYAG.

  • Looking for some help with using Oracle stored procedures in vb2010

    First off thank you to whoever lends me a hand with my problem. A little background first I am in a software development class and we are currently building our program using VB (I have no experience in this), and Oracle(currently in a Oracle class so I know how to use Oracle itself just not with VB).
    I am using vb2010 express edition if that helps. Currently I have a stored procedure that takes a 4char "ID" that returns a position (ie, salesperson,manager ect). I want to use the position returned to determine what vb form is displayed (this is acting as a login as you dont want a salesperson accessing the accountants page for payroll ect).
    Here is the code I have currently on the login page of my VB form
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class Login
    Dim conn As New OracleConnection
    Private Sub empID_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles empID.Click
    End Sub
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
    conn.ConnectionString = "User ID = Auto" & _
    ";Password = ********" & _
    ";Data Source = XE"
    conn.Open()
    Dim sq1 As String = "Return_Position" 'name of procedure
    Dim cmd As New OracleCommand(sq1, conn)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.Add(New OracleParameter("I_EmpID", OracleDbType.Char, 4)).Value = Emp_ID.Text
    Dim dataReader As OracleDataReader = cmd.ExecuteReader
    dataReader.Read()
    Dim position As New ListBox
    position.Items.Add(dataReader.GetString(0)) 'were I am getting an error, I also tried using the dataReader.getstring(0) to store its value in a string but its a no go
    If position.FindStringExact("MANAGER") = "MANAGER" Then
    Me.Hide()
    Dim CallMenu As New Menu()
    CallMenu.ShowDialog()
    End If
    LoginBtn.Enabled = False
    End Sub
    I have read the oracle.net developer guide for using oracle in vb2010 and have successfully gotten through the document however they never use a stored procedure, since the teacher wants this program to user a layered architecture I cannot directly store sql queries like the document does, thus the reason I want to use stored procedures.
    This is getting frustrating getting stuck with this having no background in VB, I could easily do this in c++ using file i/o even through it would be a pain in the rear....

    Hello,
    I am calling Oracle 11g stored procedures from VB.Net 2010. Here is a code sample (based on your code) you should be able to successfully implement in your application.
    Please note that you may have to modify your stored procedure to include an OUT parameter (the employee position) if it doesn't have it yet.
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
    Dim sProcedureName As String = "Return_Position" 'name of stored procedure
    Dim ORConn as OracleConnection, sConn as String
    Dim sPosition as String, sDataSource as String, sSchema as String, sPWD as String
    Dim cmd As OracleCommand
    'please provide below sDataSource, sSchema and sPWD in order to connect to your Oracle DB
    sConn = "Data Source=" & sDataSource & ";User Id=" & sSchema & ";Password=" & sPWD & ";"
    ORConn = New OracleConnection(sConn)
    ORConn.Open()
    cmd = New OracleCommand(sProcedureName, ORConn)
    With cmd
    .CommandType = Data.CommandType.StoredProcedure
    'input parameter in your stored procedure is EmpId
    .Parameters.Add("EmpID", OracleDbType.Varchar2).Value = Emp_ID.Text
    .Parameters.Item("EmpID").Direction = ParameterDirection.Input
    'output parameter in your stored procedure is Emp_Position
    .Parameters.Add("Emp_Position", OracleDbType.Varchar2).Direction = ParameterDirection.Output
    .Parameters.Item("Emp_Position").Size = 50 'max number of characters for employee position
    Try
    .ExecuteNonQuery()
    Catch ex As Exception
    MsgBox(ex.Message)
    Exit sub
    End Try
    End With
    sPosition = cmd.Parameters.Item("Emp_Position").Value.ToString
    'close Oracle command
    If Not Cmd Is Nothing Then Cmd.Dispose()
    Cmd = Nothing
    'close Oracle connection
    If Not ORConn Is Nothing Then
    If not ORConn.State = 0 Then
    ORConn.Close()
    End If
    ORConn.Dispose()
    End If
    ORConn = Nothing
    If UCase(sPosition) = "MANAGER" Then
    Me.Hide()
    Dim CallMenu As New Menu()
    CallMenu.ShowDialog()
    End If
    LoginBtn.Enabled = False
    End Sub
    If you need further assistance with the code, please let me know.
    Regards,
    M. R.

  • Using Oracle Stored Procedure in Interactive Reporting

    Hello,
    i'm trying to use Oracle Store procedure in Interactive reporting but all i get are errors.
    My env:
    Interactive Reporting 9.3.1
    Oracle Database 10.2
    I created OCE as ODBC/OBDC. Tables are returned and Stored Procedure entry is enabled.
    If i use "microsoft ODBC for Oracle" i can see stored procedure list but i get this error:
    SQL API: [SQLExecDirectW], SQL RETURN: [-1], SQL STATE: [42000], SQL NATIVE ERROR: [6550], SQL MESSAGE: [[Microsoft][ODBC driver for Oracle][Oracle]ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST_PDC_RECORDSET'
    If i use Oracle's odbc i get: "Error in function sequence".
    If i use Merants (5.2) odbc i cannot retreive stored procedure list. (list is empty)
    Note.
    My stored procedure works (tested via sqlplus).
    thank u daniele

    Returning (or sending in) multiple rows directly from (or to) a stored procedure is not currently possible. I have been in contact with SAP on this subject earlier, and they suggest using a web service to do the job. I used this as a work around, calling the stored procedure from a web service. I send in VC tables to this web service, and this in turn contacts my stored procedure.
    The problem is related to the connector framework in the J2EE environment.
    I am on 7.0 sps 17
    If you use stored procedure single value parameters of type varchar, number ... then VC has no problem communicating with your procedures.
    Good luck
    Henning Strand

  • Problem in calling Oracle stored procedure from Java.

    I am trying to invoke the Oracle stored procedure from Java. The procedure does not take any parameters and does not return anything. If I call it from SQL prompt it is working perfectly. I am calling it in my program as follows.
    callable_stmt=con.prepareCall("{call pkg_name.proc_name()}");
    callable_stmt.execute();
    The problem is the control-of-flow is getting strucked in the second line I wrote. It is not giving any error also.
    Please clarify me what's wrong with my code?
    Seenu.

    And how long does the stored procedure take to run from your client machine when running it via sqlplus?

  • Problem in writting oracle stored procedure in java

    Hi,
    Can anybody please suggest me how can I access oracle stored procedure in Java.
    Thanks

    please find the examples in the below url.
    http://javaalmanac.com/egs/java.sql/pkg.html

  • Unknown Database Connector Error using Oracle stored procedures

    We are using an Oracle database for the first time with our Crystal Reports, and I am attempting to modify a report to use a new stored procedure.  When I attempt to add either the new procedure, or to add a new copy of the existing procedure, I get an error message:
    Unknown Database Connector Error
    If I remove the existing procedure first (leaving no database objects at all), and then attempt to add back exactly the same stored procedure that I just removed, I get a different error message:
    Database Connector Error: '42000:[Oracle][ODBC]Syntax error or access violation'
    Neither of these errors is particularly helpful.  The stored procedure in question works as is.  I can run it in SQL Developer, and it also executes within the existing report if I run it.  Unfortunately, it needs to be modified and given a new name, so I need to be able to add the new stored procedure to the report.
    The operating system is Windows XP Professional version 2002 SP3.  The Oracle version is 11g (11.2.0.2.0).  Crystal reports version is Crystal Reports 2008 (12.3.0.601).  The stored procedure returns a refcursor.  The ODBC connection is created using the "Oracle in OraClient11g_home1" driver.  When I test the connection, it tells me it was successful.
    If it matters, the report is a Saba report.
    Can anyone shed any light on what the problem is and how to fix it.  If the solution is to upgrade the Windows version, that is under the control of our tech support and there is no information available as to when it will happen.

    Yes - I had used the Set Datasource Location to point to the correct ODBC connection.  I get the same results with an existing report as I do with a new blank report.
    I have no idea where the service market place is.  Honestly, I find the entire SAP site confusing.  I found one reference to the PAM guide, but when I clicked on it, it insisted on a userid/password, and apparently the userid/password I have for this discussion group doesn't pass.  I did find, eventually, a document called "Crystal Reports 2008 Service Pack 3 for Windows - Supported Platforms".  When I read it, it tells me that it's compatible with Oracle 11g, generic ODBC, and Windows XP SP3, which is what we are using.  I'm hoping that this document has equivalent information to the PAM guide.

  • Using Oracle Stored Procedure to call a webservice

    Hi,
    I am using this version of Oracle:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Requirement: I have to write a stored procedure that calls a webservice and get the result from webservice and show it on sqlplus.
    I have read some articles, and am confused as to where to start. I have come across UTL_DBWS and UTL_HTTP. But to use them, I have to set up my database accordingly allocating pool size etc.
    Is there an alternative?
    I am reading through a lot of stuff, but I am honestly not getting a hold of anything. Please advice, how I can go step by step.
    Thank you!!

    934451 wrote:
    Hi,
    I am using this version of Oracle:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Requirement: I have to write a stored procedure that calls a webservice and get the result from webservice and show it on sqlplus.
    I have read some articles, and am confused as to where to start. I have come across UTL_DBWS and UTL_HTTP. But to use them, I have to set up my database accordingly allocating pool size etc.
    Is there an alternative?
    I am reading through a lot of stuff, but I am honestly not getting a hold of anything. Please advice, how I can go step by step.
    Thank you!!don't use Oracle to complete any non-DB related task.
    while a shovel is a great tool for producing a hole in the ground,
    it is sub-optimal when the wrong end of the shovel is used to move the dirt.
    You are using the "wrong end" of Oracle.

  • Problem while executing a Stored Procedure

    Hi,
    im a newbie,using Oracle 10g v(10.2.0.1.0) on linux machine.
    Im unable to execute following procedure through iSQLPLUS query interface.
    create or replace procedure pd_hr(
    pno varchar2,
    pdt date default sysdate,
    phr out number,
    perr_msg out varchar2
    ) as
    begin
         phr := 2;
    end pd_hr;
    VARIABLE phr number;
    VARIABLE perr_msg VARCHAR2(250);
    execute pd_hr('pno',NULL,phr,perr_msg);
    It flashes the following error when i try to execute the stored proc:
    ERROR at line 1:
    ORA-06550: line 1, column 44:
    PLS-00201: identifier 'PHR' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    I executed the following query through DBA login before executing the procedure:
    GRANT EXECUTE ANY PROCEDURE TO "SCOTT";
    Any kind of assistance will be priceless!
    Peter

    Hi, Peter,
    user10707566 wrote:
    Thanks Frank, it worked seamlessly!
    btw what the ':' signifies here?":" just means "this is a bind variable".
    It's convenient, because when you name a bind variable "phr", you can use ":phr" without worrying whether there is a column or a local variable that is also called phr, and, if so, which one takes precedence.

  • How to Return ten records into java class by using oracle stored procedure

    Hello sir/Friends
    There is a procedure that returns 10 records from the oracle table and i want to display all 10 records into the table in java class.
    Please reply
    Thanking you.

    When you execute the stored procedure it will return your results as a ResultSet. Iterate over itto get the values you need then do with them as you please.
            List<MyObject> results = new ArrayList<MyObject>();
            MyObject mo = null;
            ResultSet rs = stmt.executeQuery("SELECT a_value FROM a_table");
            while (rs.next())
                mo = new MyObject();
                mo.setValue(rs.getString(1));
                results.add(mo);
            }

  • Getting error while Calling Oracle Stored Procedure with output Parameter

    HI All,
    From long days i am working on this but i unable to solve it.
    Even i have studied so many forums in SAP but i didn't find the solution.
    I am calling Oracle Store procedure with 3 inputs and 1 output without cursor.
    Store Procedure:-
    CREATE OR REPLACE PROCEDURE PDS.send_rm
    IS
    proc_name           VARCHAR2(64) := 'send_rm';
    destination_system  VARCHAR2(32) := 'RAWMAT';
    xml_message         VARCHAR2(4000);
    status_code         INTEGER;
    status_message      VARCHAR2(128);
    debug_message       VARCHAR2(128);
    p_ret               INTEGER;
    BEGIN
      DBMS_OUTPUT.PUT_LINE( proc_name || ' started' );
      xml_message := '<RAW_MATERIAL>'||
                     '<BAR_CODE>10000764601</BAR_CODE>'||
                     '<MATERIAL>1101448</MATERIAL>'||
                     '<VENDOR_CODE/>'||
                     '<PRODUCTION_DATE>0000-00-00</PRODUCTION_DATE>'||
                     '<EXPIRE_DATE>0000-00-00</EXPIRE_DATE>'||
                     '<BATCH/>'||
                     '<PO_NUM/>'||
                     '<MATERIAL_DESCRIPTION>POWER SUPPLY</MATERIAL_DESCRIPTION>'||
                     '<SPEC_NAME/>'||
                     '<STOCK_CODE>BSW-JH</STOCK_CODE>'||
                     '<INSPECTION_LOT>00</INSPECTION_LOT>'||
                     '<USAGE_DECISION_CODE/>'||
                     '<MATERIAL_GROUP>031</MATERIAL_GROUP>'||
                     '</RAW_MATERIAL>';
          dbms_output.put_line('XML '||xml_message);
    --      vp_interface.load_rawmat@cnprpt1_pds(SYSDATE, destination_system,
    --                   xml_message, p_ret);
          vp_interface.load_rawmat(SYSDATE, destination_system,
                       xml_message, p_ret);
          dbms_output.put_line('Return Code '||p_ret);
          COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
        status_code := SQLCODE;
        status_message := SUBSTR(SQLERRM, 1, 64);
    --    Extract_Error_Logger(proc_name, 'LOCAL', SYSDATE, -999,
    --                         status_message, 0, debug_message);
        ROLLBACK;
    END send_rm;
    And while i am calling this Store procedure in MII, I am facing error.
    I have tried different ways but didnt solved
    In SQL Query, i kept mode as: FixedQueryOutput
    Can anyone tell me or send code for calling above store procedure
    And onemore thing, While creating store procedure in Oracle for MII. Do we need to Create output parameter as cursor or normal.  
    Thanks,
    Kind Regards,
    Praveen Reddy M

    Hi Praveen
    Our wrapper was created because we could not modify the procedure we call (it was not returning a cursor).
    CREATE OR REPLACE PROCEDURE CHECK_PUT_IN_USE
    (STRCMPNAME in varchar2,
    STRSCANLABEL in varchar2,
    RCT1 out SYS_REFCURSOR
    AS
      charDispo          Char(1);
      charStatus          Char(1);
      intCatNo          Integer;
      charCatDispo     Char(1);
      strCatQual          VarChar2(2);
      strCatDesc          VarChar2(30);
      strMsg          VarChar2(128);
    BEGIN
    qa.check_put_in_use@AR(STRCMPNAME,
                                              STRSCANLABEL,
                                              charDispo,
                                              charStatus,
                                              intCatNo,
                                              charCatDispo,
                                              strCatQual,
                                              strCatDesc,
                                              strMsg);
    OPEN RCT1
    FOR Select charDispo,charStatus,charDispo,charStatus,intCatNo,charCatDispo,strCatQual,strCatDesc,strMsg from Dual;
    END;
    Hope this helps
    Regards
    Amrik
    then with a FixedQueryWithOutput
    call mixar.qasap.wrapper_update_put_in_use('[Param.1]','[Param.2]',[Param.3],?)
    Hope this helps.

  • Problem while using oracle.sql.CLOB

    Hello,
    I was trying to use oracle.sql.CLOB to update CLOB types in database. I was able to successfully run the update when I use the connection obtained from normal DriverManager.getConnection method. But have issues when I use a datasource lookup, Am using Websphere as my JDBC provider environ.
    The exception I get during the execution of this line is
    oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary((java.sql.Connection)conn, false, oracle.sql.CLOB.DURATION_CALL);
    java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection
    as my connection is obtained by DataSource.getConnection() method.
    Is this a documented limitation of Oracle SQL CLOB class or is there a way I can tweak the code to work.
    Am using a oracle 9i thin driver
    Thanks
    Message was edited by:
    caniknow

    With the new Oracle drivers there is no need to do it that complicated.
    Finally Oracle has implemented the standard JDBC calls, and inserting a CLOB is really easy now:
    String clobContent  = populateClobData(); // whatever...
    stmt = con.prepareStatement("INSERT INTO clob_table (id, clob_col) VALUES (?,?)";
    stmt.setInt(1, 42);
    Reader r = new StringReader(clobContent);
    stmt.setCharacterStream(2, r, clobContent.length());
    stmt.executeUpdate();
    con.commit();This works with UPDATE as well. If you need to deal with BLOBs simply use setBinaryStream().
    Reading is done using getCharacterStream() or getBinaryStream()
    This actually works across all (or at leas all major) database systems

  • HI sir, i  got a problem while using oracle 11g,where it is asking username

    I installed Oracle11g R1 DB version 11.1.0.6 and upgraded it to 11.1.0.7 using patch set 6890831 .After that i wantd to use SQL * plus,but it is asking username & passwords. But while installing it didn't ask for any usernames ,so i tried all default usernames but didnt work. Can any one help me.

    Hi,
    After applying patch did u create Listener(using netca command) and created a database(using dbca command) ?
    I guess u have not created the database where u would be providing the username and password to login to sqlplus.
    If u have any other queries let me know.
    Thanks,
    Edwin

  • How to call Oracle Stored Procedure using EDQ

    Can someone tell me how to use Oracle Stored Procedure call in EDQ, sample scripts/steps will be really helpful. Thanks!

    It is also possible to do this using a custom processor in EDQ. The processor needs to do something very similar to the external task above (opens a DB connection, authenticates, runs a stored procedure).
    If you need this, please talk us through the use case so we can determine if it is the best fit. In some ways, an external task is better as logically a stored procedure call is normally divorced from any process logic in EDQ.
    Regards,
    Mike

  • Oracle Stored Procedure using CR2011

    We have CR11.5 reports that works using Oracle Stored Procedure.  We are planning to upgrade to CR2011 but the report fails with the error message Failed to retrieve data from database.  Details HY000 may not perform insert/delete/update operation inside a READ ONLY transaction

    Hello Don,
    I am trying to use OLE DB to access the stored procedure in the oracle. I can see the stored procedure in the crystal report with the fields but whenever i refresh i face a message box 
    the text of the message box is as follows
    Crystal Reports
    Failed to open a rowset.
    Details: ADO Error Code: 0x80040e14
    Source: Microsoft OLE DB Provider for Oracle
    Description: ORA-06550: line 1, column 42:
    PLS-00363: expression ' NULL' cannot be used as an assignment target
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Native Error: 6550
    OK  
    My stored procedure code is as follows
    Create or Replace Package pckReports
    AS
    type agent_list is ref cursor return BAT_AGENTLIST%rowtype;
    END;
    CREATE or REPLACE PROCEDURE BatAgentlistReport (p_Recordset IN OUT pckReports.agent_list) AS
    BEGIN
    Open p_Recordset FOR
      select * from bat_agentlist;
    END;
    The Ole db version is :- 10.1.0.4.0
    The stored procedure is developed in Oraclient10g.
    I am developing the stored procedure from the microsoft visual studio using a connection with the provider :- OraOLEDB.Oracle.1

Maybe you are looking for

  • Certain albums won't play on Iphone but still play perfectly fine in Itunes

    Since I updated my Iphone to IOS5, certain albums won't play. They work perfectly fine in Itunes on my imac and the still appear in my library on the Iphone, but it won't start playing. The strange thing is, they are all albums from this year. All th

  • How to change name of downloaded file by URLLink.acsm

    When I browser my URLLink.acsm: "http://host:8080/fulfillment/URLLink.acsm?action=...." it download a file named "URLLink.ascm". How can I change that file name to "title.acsm" insteed of "URLLink.ascm"? For example: "ShakespearInLove.acsm". I'm usin

  • Exception message"no BOM selected"

    Hi Experts,                   In what circumstances is the above error message i.e. "no BOM selected" thrown ? When I am running MD02 for a FG, I am getting this message. This FG has only one SFG as it's component in the BOM. Production version for F

  • Reg:BPM execution

    hi can i know where exactly the integration process executes in IE/BPE Regards chandrakanth

  • Email addresses are being saved as contacts

    Every person I email from my desktop (work) computer, their email address is being automatically saved as a contact in my address book. Considering I can email up to 50 new people a day, its becoming very frustrating. Only happened since upgrading to