Call a storedprocedure with CLOB input parameter gives ORA-24811 error

Hi all,
     I am calling a storedprocedure from VB using ADO and OraOLEDB. Calling stored procedure as mention in OraOLED documentation.
     The procedure accepts a varchar and a CLOB parameter.
     While executing the store procedure its throw an error as “Error while trying to retrieve text for error ORA-24811”
     Then I executed a storeprocedure with only one CLOB out parameter. It is working fine.
     Oracle version is
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Linux IA64: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production
     O/S: Linux.
     OLEDB version 9.0.1.0.1
     But exact code working with
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 – Production
O/S window 2003
OLEDB version 9.0.1.0.1
Can somebody help me on this?
Regards,
Mani
Sample code of stored of stored procedure and VB function pasted below.
StoreProcedure
============
create or replace procedure xmltext (EmpName varchar2,EmpDetails CLOB)
as
begin
insert into emptmp values (EmpName);
end;
VB function
=========
Dim Oracon As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim param1 As New ADODB.Parameter
Dim param2 As New ADODB.Parameter
Dim empname As String
Dim empdetails As String
Set Oracon = CreateObject("ADODB.Connection")
Oracon.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=testdb;User ID=newtest;Password= newtest;PLSQLRSet=1;SPPrmsLOB=1"
Oracon.Open
empname = "Mani"
empdetails = "<EmpDet/>"
Set cmd.ActiveConnection = Oracon
cmd.CommandType = adCmdText
Set param1 = cmd.CreateParameter("param1", adVarChar, adParamOutput, 10, empname)
cmd.Parameters.Append param1
Set param2 = cmd.CreateParameter("param2", adLongVarChar, adParamInput, 10000, empdetails)
cmd.Parameters.Append param2
cmd.CommandText = "{ call xmlText(?,?)}"
cmd.Execute

code for my procedure testblob is :
create or replace procedure testblob(bpic blob) as
     val               blob;
     v_rdata          blob;
     v_start          BINARY_INTEGER := 1;
     v_buffer     BINARY_INTEGER := 32767;
BEGIN
select pic into val from my_pic where no=1 for update;
DBMS_LOB.OPEN (val, DBMS_LOB.LOB_READWRITE);
FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(bpic) / v_buffer)
     LOOP
     v_rdata :=DBMS_LOB.SUBSTR(bpic, v_buffer, v_start) ;
     DBMS_LOB.WRITEAPPEND(val, DBMS_LOB.GETLENGTH(v_rdata), v_rdata);
     v_start := v_start + v_buffer;
     END LOOP;
dbms_lob.close(val);
exception
     when others then
          raise_application_error(-20000,sqlerrm);     
end;

Similar Messages

  • Calling PLSQL Procedure with CLOB input parameter from JDBC

    Hi..
    I've got a PLSQL procedure with a CLOB object as input parameter:
    function saveProject (xmldoc CLOB) RETURN varchar IS
    I want to call that procedure from my JDBC Application as...
    String data = "..."
    CallableStatement proc = conn.prepareCall
              ("begin ? := saveProject (?); end;");
    neither
    proc.setCharacterStream(2, new StringReader(data, data.length());
    nor
    proc.setString(2, data);
    will work.
    The Application throws java.sql.Exception: ... PLS-00306 wrong
    number or types of arguments in call 'SAVEPROJECT'
    How can I use set setClob method?
    The Problem is: with Oracles CLOB implementation I can't create
    an Instance, and from the CallableStatement a can't get a
    Locator for a CLOB-Object.
    This CLOB stuff makes me really nuts!
    please somebody help me.. thanks
    Alex

    Hi All,
    You can not make it like that.
    You can not make clob as input parameter.
    Do you want an easy way?
    This is the easy way.
    sample:
    function myFunction(S varchar2(40))
    return integer as
    begin
    insert into TableAAA values(S)
    --TableAAA only contains 1 column of clob type
    end;
    This will work the problem with this is the parameter is in
    varchar2 right? so there will be limited length for it.
    You can do this to call that function:
    nyFunction('My String that will be input into clob field');
    There's another slight difficult way, I understand that you have
    installed Oracle client/server in your system, try to look at
    jdbc folder and try to find demo.zip in that folder, you can
    find several ways of doing thing with jdbc.
    Have a nice day,
    Evan

  • Call function from data base with clob input parameter.

    Hello,
    In this project I use Jdev 11g.
    I call function from database.
    create or replace function get_fa_list (
    p_fa_id_list in clob
    return sys_refcursor
    is
    vCursor sys_refcursor;
    begin
    put_msg ('begin');
    if p_fa_id_list is null then
    put_msg ('CLOB is null!');
    else
    put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
    end if;
    put_msg ('Save');
    open vCursor for
    select rownum as id, s.*
    from (
    select f.latitude, f.longitude, count (distinct f.res_id) as res_count, count (*) as fa_count, 16711680 as color, res_concat_distinct (f.res_id) as station_list
    from mv_frequency_assignment f, table (SplitClob (p_fa_id_list, ',')) l
    where f.ext_system = 'BI' and
    f.ext_sys_id = l.column_value
    group by f.latitude, f.longitude
    ) s;
    put_msg ('Open and End');
    return vCursor;
    end get_fa_list;
    I use TopLink in ejb.
    i use follow code for call function and get result.
    public List<TmpResPoints> findAllPointsBI(String p_id){
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    uow.beginEarlyTransaction();
    StoredFunctionCall call = new StoredFunctionCall();
    call.setProcedureName("get_fa_list");
    call.useUnnamedCursorOutputAsResultSet();
    ClobDomain c = new ClobDomain(p_id);
    //System.out.println(c.toString());
    call.addNamedArgumentValue("p_fa_id_list", c);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(TmpResPoints.class);
    query.setCall(call);
    List<TmpResPoints> result = (List<TmpResPoints>)uow.executeQuery(query);
    uow.commit();
    uow.release();
    return result;
    But size parameter "p_fa_id_list" is 0. (geting from temp table in Data base). this code in function >>
    if p_fa_id_list is null then
    put_msg ('CLOB is null!');
    else
    put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
    end if;)
    How I can call this function from dataBase and get result?
    thx,
    Demka.

    What is the SQL generated?
    The argument should just be the Clob value (a String) not the domain object.
    Also try addNamedArgument, and then pass the named argument to the query.
    James : http://www.eclipselink.org

  • StoredProcedure and Varchar2 input parameter...

    hello,
    I call stored procedure with Varchar2 input parameter a RefCursor output parameter. Procedure returns empty dataset.probably is not set input parameter correctly.I'm using 8i oracle database and client and ODP.NET in C#.
    thank you
    peter

    Peter,
    Check if you get the OracleRefCursor correctly from the
    output RefCursor parameter.
    If the OracleRefCursor is returned properly, called the OracleDataAdapter.Fill(DataSet dataSet, OracleRefCursor refCursor) method to fill the dataset.
    Thanks
    Martha

  • Creating a job for a procedure with an input parameter

    Hi,
    I want to create a job for a procedure ( sp_proc ) with a input parameter.
    The input parameter is a date value.
    As per the syntax for dbms_job.submit procedure;
    dbms_job.submit (
    job IN BINARY_INTEGER,
    what IN VARCHAR2,
    next_date IN DATE,
    interval IN VARCHAR2 DEFAULT 'NULL',
    no_parse IN BOOLEAN DEFAULT FALSE);
    How should the procedure be declared in the 'what' parameter of the dbms_job.submit procedure ?
    Please guide.
    Thanks.

    Hi,
    You are wright, I have found this thread [DBMS_JOB -- how to pass parameters to the job|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351033761220].
    Regards,

  • Xdk: calling java function with a CharSequence parameter

    When using xdk version 10.1.0.2.0_production, you can not call a javamethod with a CharSequence parameter.
    Sun documentation:
    Interface CharSequence
    All Known Implementing Classes:
    CharBuffer, String, StringBuffer
    This prevents us from calling a method like
    java.util.regex.Pattern.matches(String, CharSequence)
    Converting the parameter to a normal string would solve the problem.
    Example to illustrate the issue:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:Pattern="http://www.oracle.com/XSL/Transform/java/java.util.regex.Pattern">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xsl:if test="Pattern:matches('...','123')">
    <xsl:text>MATCH</xsl:text>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>
    results in the following stacktrace:
    oracle.xml.parser.v2.XPathException: Extension function error: Error invoking 'matches':'java.lang.NullPointerException'
         at oracle.xml.parser.v2.XSLExtFunctions.callStaticMethod(XSLExtFunctions.java:113)
         at oracle.xml.parser.v2.XPathExtFunction.evaluateMethod(XPathExtFunction.java:296)
         at oracle.xml.parser.v2.XPathExtFunction.evaluate(XPathExtFunction.java:223)
         at oracle.xml.parser.v2.XSLCondition.testCondition(XSLCondition.java:185)
         at oracle.xml.parser.v2.XSLCondition.processAction(XSLCondition.java:165)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:403)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:507)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:484)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:256)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:146)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:218)
         at XSLSample.main(XSLSample.java:75)
    Message was edited by:
    user449717

    Hi Grarup,
    I took a stab at getting this to run and compile and this is what I came up with.  Let me know if this helps at all.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    Console.WriteLine("\"True\" or \"False\"?");
    bool boolVal = bool.Parse(Console.ReadLine());
    Functions f = new Functions();
    TestStruct t = new TestStruct() { Value = boolVal };
    f.Flip(ref t);
    Console.WriteLine(string.Format("Flipped value = {0}: ", t.Value));
    Console.ReadLine();
    public struct TestStruct
    public bool Value;
    public class Functions
    public void Flip(ref TestStruct testStruct)
    testStruct.Value = !testStruct.Value;
    Best of luck.

  • I am installing Adobe Acrobat on a Mac with OSx Mountain Lion - gives me this error DW006 any ideas?

    I am installing Adobe Acrobat on a Mac with OSx Mountain Lion - gives me this error any ideas?
    ERROR: DW006: Apple Package failed to install successfully.
    ERROR: DW050: The following payload errors were found during install:
    ERROR: DW050: - Acrobat Professional: Install failed

    No there is not enough information in this snipped of your installation log.  Please see Troubleshoot with install logs | CS5, CS5.5, CS6 - http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html for information on how to review the installation log in it's entirety.

  • TS3682 im trying to restore my iphone with itunes and it gives me this error "We're sorry, we are unable to continue with your activation at this time."

    im trying to restore my iphone with itunes and it gives me this error "We're sorry, we are unable to continue with your activation at this time."

    This is usually a symptom that the phone was hacked/jailbroken. Was it?

  • Call DLL with byte** input parameter type

    Hi All,
    Have anyone knows how to get output parameter from a Call Library Fuction with having the input prameter type is BYTE**. Please see the code below :
    void getMsgBuffFromQueue(BYTE**& p_msgBuff)
    if(m_QueueBuffMsg.GetSize() > 0)
    p_msgBuff = m_QueueBuffMsgForEqp.DeQueue();
    return ;
    I did the test this fuction of the DLL on VC++ 6 with successful. but when I tranfer it to LabView, I cannot get the parameter output data after call this fuction., I donn't know to use which control to get approriate data return.
    I define the function call on Labview like that:
    void getMsgBuffFromQueueForEqp(Array1DLong **msgBuff);
    Is it correct ? If anyone have the solutions, please give me your solution.
    Thanks in advance.

    The problem is that Array1DLong is not a C++ array, but a structure definition for a LV array. If you generate the c code from the Call Library Node, you'll notice the structure that contains the array size as part of it. In addition, there are a lot of rules about how memory should be allocated for the array elements - it is all covered in the "Using External Code in LabVIEW" manual.
    I'll also point out that your definition does not match the code. A BYTE**& is actually a BYTE*** - the C++ concept of a reference is really a pointer under the covers - it is just that the C++ language provides special support for it. However, for anyone calling the method from the outside, it needs to know that it is really a pointer. Also, if I remember correctly, you can't expose a C++ method with a reference in the definition with an extern "C" statement, which is what you probably want to do in order to easily hook it up to LV...otherwise you'll have to deal with the C++ name-mangled version.
    There are two ways I would recommend going here.
    1. Don't use a Call Library Node but a CIN instead. The manual will walk you through the work necessary to marshall the two different data types in and out of LV.
    2. Return the buffer to LV as a void*. In this case what are you saying to LV is "here is a handle I want you to hold onto...just give it back to me when I need it". Then you create some additional C functions that take the void* and do the data manipulation with it.
    Which one you pick depends a lot of what you want. If you want to manipulate the data within LV with LV constructs, you need to go with #1. If you just need to pass the buffer to another C function, then #2 is the way to go.
    Did that make any sense?
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • 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

  • Stored Procedure Call with only Input Parameter

    Hi, The Example at Oracle Toplink Developer's Guide, Volume 5 uses an output param named IS_VALID. How Can I Call a Stored Procedure that has only Input Param ? If I don't use an Ouput Param Toplink throw the following Exception:
    *Excepción [TOPLINK-4002]* (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070620)): oracle.toplink.exceptions.DatabaseException Excepción Interna: java.sql.SQLException: ORA-00900: invalid SQL statement
    Here's the Sample Code Depicted at the Guide:*
    Example 98–48 Stored Procedure Call with an Output Parameter
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("CHECK_VALID_POSTAL_CODE");
    call.addNamedArgument("POSTAL_CODE");
    call.addNamedOutputArgument(
    "IS_VALID", // procedure parameter name
    "IS_VALID", // out argument field name
    Integer.class // Java type corresponding to type returned by procedure
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("POSTAL_CODE");
    Vector parameters = new Vector();
    parameters.addElement("L5J1H5");
    Number isValid = (Number) session.executeQuery(query,parameters);
    Here's my code
    StoredProcedureCall call = new StoredProcedureCall();
         call.setProcedureName("MYSTOREDPROCEDURE");
         call.addNamedArgument("INPUTPARAM1");
         call.addNamedArgument("INPUTPARAM2");
         call.addNamedArgument("INPUTPARAM3");
         call.addNamedArgument("INPUTPARAM4");
         call.addNamedArgument("INPUTPARAM5");
         call.addNamedArgument("INPUTPARAM6");
         ValueReadQuery query = new ValueReadQuery();
         query.setCall(call);
         query.addArgument("INPUTPARAM1");
         query.addArgument("INPUTPARAM2");
         query.addArgument("INPUTPARAM3");
         query.addArgument("INPUTPARAM4");
         query.addArgument("INPUTPARAM5");
         query.addArgument("INPUTPARAM6");
    Vector parameters = new Vector();
         parameters.addElement("INPUTVALUE1");
         parameters.addElement("INPUTVALUE2");
         parameters.addElement("INPUTVALUE3");
         parameters.addElement("INPUTVALUE4");
         parameters.addElement("INPUTVALUE5");
         parameters.addElement("INPUTVALUE6");
         uow.executeQuery(query,parameters);
    Regards,
    Manuel

    You need to use a DataModifyQuery as your query does not return anything.
    James : http://www.eclipselink.org

  • Cisco webview - create a template with new input parameter

    Dear all,
    I know the Infomaker will help to create a template for webview. I have done with some custom template. My problem is that I can not change the input parameter for webview page. For example, if the template under the skill group, I can only choose with skill group and datetime to generate the report.
    I want to change the input field on the web page, for example the input will be a calling number and a range of datatime and the webview will query on the detail table and pop out some detail call.
    Or I want to run the report for outbound dialer, the input is the customer number and the output page will be the status of this customer call (closed, retry, pending...)
    Can I create a new set of template like Call Detail beside the default Call Type, Agent, Skill Group...?
    Please help to give me some advices.
    Thank you,
    Thanh

    I've personally never seen anything like this done, not saying it is not possible, but you might have to use a different reporting mechanism all together in order to achieve something like this.  I've always been curious why someone would request a report on a single call, just seem like a single call will never trully give you a true representation of your call center metrics.
    Sorry if this is not much help.
    david

  • Problems with Mapping Input Parameter

    Hi everybody,
    just another question. I have a Mapping with an Mapping Input Parameter. If i provide a Parameter with an prefixed 0 e.g.: 01234 the output of this is 1234.
    How can i manage this that the output of the Input Parameter ist 01234 and not like now 1234?
    Many thanks in advance.
    Greetings

    The Mapping Input Parameter is of type varchar2 and it still gives 1234. The Problem is i have to provide the whole input parameter for logging proposes. I managed this now by building a workflow an provide the mapping input parameters to new variables. Now the Input 01234 gives 01234....:-)
    Does anybody know another solution for this problem?
    Greetings

  • Web service data control with complex input parameter problem

    Hi!
    I'm making ADF web app, using JDev 11.1.1.2.0. I have to call a web service (using a data control), which has complex input parameter (array of complex objects).
    I followed steps from Susan Duncan blog: http://susanduncan.blogspot.com/2006/09/dealing-with-complex-input-params-in.html , but I ran into a problem.
    As Susan wrote, I changed submit's button action binding to an operation in a managed bean, which returns array of objects and everything works fine. I can call a WS and my table shows the result.
    The problem is, that after I change button's action binding to my manage bean, row selection in result table doesn't work anymore (I allways get NullPointerException).
    What can be done here?
    Can somebody please help?

    Hi,
    I also have similar type of problem where I need to invoke a Web service with Complex input parameters.
    I followed Susan's blog but I stuck at a point where methos getItem is created.
    Can anyone tell me how to get that method for my requirement.
    If possible can you guys share your solutions here.
    Thanks in advance.

  • SUBMIT keyword along with one input parameter

    Hi
    actually i have two programs A and B.
    i am calling B using SUMBIT, from program A.
    but for B program there is one input parameter,
    what i need is, B program should execute with SUBMIT as well as input field.
    thanks in advance
    vEnu

    Hi,
      Refer this
    Program accessed
    REPORT report1.
    DATA text TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Regards,
    Prashant

Maybe you are looking for

  • Why does PHP code i wrote in Netbeans not work in Dreamweaver?

    Hello i've made some code in Netbeans that worked perfectly there. I tested it on the same server and everything so that can't be the problem it's truely how Dreamweaver handles the code differently from Netbeans. I'd like to know how i can avoid tha

  • APP-FND-01931: Your session is no longer valid or your logon information...

    Hello everyone, I have an instance which was cloned successfully through Rapid clone and after finishing the clone we refreshed the database using the hot backup we have (RMAN). Database is successfully cloned and opened but we are unable to login to

  • I don't know what I'm doing... :(

    I'm lost with this program. I just moved up from Garageband but I can't seem to figure out how to work it. I dragged a garageband song file to Logic Express to edit it further but can't seem to get any sound coming out of my speakers while the song i

  • Url rewriting/redirecting

    Hi everyone, I have a domain say: http://zoramhere.com If a user enters http://zoramhere.com/anything I want to redirect it to the index page say: http://zoramhere.com/index.jsp What should I do? Please suggest the steps I should follow to complete s

  • Top 10 values in each category

    I have a table that has the following columns: Category Item Cost I would like to find out what the top 10 most expensive items are in each category. Is there a way you can do this with 1 SQL statement??? I have tried using the rank analytical functi