Using blob or clob from db as document

I'm changing a working process to fetch an XDP document from a database rather than fetch from resources:// on the Adobe server. The DB2 database field containing the XDP is a clob data type. We were using blob. The services operations are:
- Foundation/JdbcService/Query Single Row   this fetches the XDP
- Foundation/SetValue/Execute   this converts whatever was fetched into a document variable
- Forms/FormsService/renderPDFForm   this merges the document with XML and produces PDF output
I'm unable to write the database field into a variable due to lack of choices. For instance there is no BLOB or CLOB variable type in the list of available types. When using STRING I get the following error:
Caused by: java.io.NotSerializableException: com.ibm.db2.jcc.b.ub
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at com.adobe.idp.dsc.util.CoercionUtil.toString(CoercionUtil.java:498)
When using XML I get the following error:
Caused by: com.adobe.workflow.WorkflowRuntimeException: Invalid location: /process_data/@clob_XDP_string cannot be stored for action instance: -1
    at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:701)
When using OBJECT I get the following error:
Caused by: com.adobe.workflow.WorkflowRuntimeException: Invalid location: /process_data/@clob_XDP_string cannot be stored for action instance: -1
    at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:701)

Steve,
Going against DB2 doesn't work for me with a document variable type. It gives a coercion error.
I did solve my problem though from the following URL: http://groups.google.com/group/livecycle/browse_thread/thread/6c4b9156b52b71a7
JYates:
You can do this, but you have to  use the Execute Script service -- at this time there isn't a deployable component for it.
Use this sort of script in the Execute Script service to read  the PDF blob from the database and populate a Document variable.
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.sql.DataSource;
import javax.naming.InitialContext; 
int processId =  patExecContext.getProcessDataIntValue("/process_data/@id"); 
InitialContext context = new InitialContext();
Connection connection = ((DataSource)context.lookup("java:/IDP_DS")).getConnection(); 
String queryQuery = "select bigdocument, bigstring from tb_pt_workwithxlobs where process_instance_id = ?";
PreparedStatement queryStatement = connection.prepareStatement(queryQuery); 
try {
   queryStatement.setInt(1, processId);
   ResultSet results = queryStatement.executeQuery();
   results.next();
   java.sql.Blob documentBlob = results.getBlob(1);
   com.adobe.idp.Document document = new com.adobe.idp.Document(documentBlob.getBinaryStream());
   patExecContext.setProcessDataValue("/process_data/@NewBigDocument",document);
   java.sql.Clob stringClob = results.getClob(2);
   patExecContext.setProcessDataValue("/process_data/@NewBigString",stringClob.getSubString( 1L,(int)stringClob.length()));
catch(Exception ex) {
   ex.printStackTrace();
queryStatement.close();
connection.close();

Similar Messages

  • Persisting Oracle BLOBs & CLOBs from a CMP Bean

    Can someone tell me how to persist Oracle BLOBs and CLOBs from a CMP Bean?
    Thanks,
    Abel

    A link to the answer might be helpful.
    Dave
    "Abel Rosnovski" <[email protected]> wrote in message
    news:[email protected]..
    >
    >

  • Using BLOB for storing OLE Item and Concadinating

    Hi,
    We are using BLOB data type to store Word document using OLE
    interface in forms 6i. It is working fine.
    Now we want to merge two or more BLOB items to one item to make
    the document as a single document. We tried to use
    DBMS_LOB.APPEND package to do the same but we could see only the
    first document that is appended and the remaining documents are
    not visible. When we analyzed the size of the BLOB item, it is
    getting increased whenever we append another document.
    Looking for the solution urgently. It would be better to have
    the code that is used for doing this.
    Thanks in Advance,
    Ganesan

    What you say seems quite normal.
    You should not use dbms_lob.append, but rather call Word and
    copy the text & other objects from one of the LOBs to the end of
    the other one.
    I wish I could tell you more about how to do that, but I don't
    know. I'm still looking for more doco on the methods &
    properties for Word & XL to be invoked when using OLE2.

  • Help required in handling of Oracle BLOB and CLOB in OC4J

    Hi,
    I am in a process of porting my application from Weblogic 6 to OC4J.
    I have problem while handling CLob and Blob's in oracle. Weblogic has
    classes defined to do the same. (weblogic.jdbc.common.OracleClob)
    Does any one know how I can achieve this.
    Thanks in advance.
    Regards,
    Moin

    We have an application running on OC4J accessing an Oracle 8.1.7 db, and have no problems using BLOBs and CLOBs. It is explained quite clearly in the Oracle documentation.
    If you require further assistance let me know :-)

  • Event for transferring information from the billing document to the fica do

    Dear all,
    We are having a requirement in which we need to transfer the information from the billing document to the fica document..Can anybody tell me which event can be used for  transferring information from the billing document to the fica document
    Susmita

    Susmitha Harini,
    Can you provide exactly what you want to transfer? Do u want to transfer that information at billing moment?
    Best Regards,
    Pedro Nunes

  • Create CLOB from string not coming from ResultSet

    I need to populate a preparedStatement parameter
    using setClob(). The data which goes into the parameter
    is a String. I need to convert the string to a Clob. How do
    I do this? The String is over 4000 characters long and
    will be entered into an Oracle CLOB field.
    Any tips?

    The Oracle JDBC documentation has a section on using Blobs and Clobs that should answer your question:
    http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oralob.htm#1043220

  • BLOB / CLOB operations using JDBC connections taken from WebLogic 6.0 connectrion pool

    Hi..
    I need to do some CLOB operations using JDBC connection taken
    from WebLogic 6.0 connection pool. Will weblogic 6.0 supports it.?
    I am getting errors when trying to do it in normal way .
    It seems like ResultSet.getClob() returns an RMI (kind of ) object
    instead of the Clob object.
    If you have any idea . Pls respond to [email protected]
    Nazilin

    Hi..
    I need to do some CLOB operations using JDBC connection taken
    from WebLogic 6.0 connection pool. Will weblogic 6.0 supports it.?
    I am getting errors when trying to do it in normal way .
    It seems like ResultSet.getClob() returns an RMI (kind of ) object
    instead of the Clob object.
    If you have any idea . Pls respond to [email protected]
    Nazilin

  • Function convertion from blob to clob

    Plesae need help,to make function convert from blob to clob
    i have function but not work when coulmn of blob is vey large
    =========================================================================================
    CREATE OR REPLACE PACKAGE BODY "SHB_PACKAGE"
    AS
    FUNCTION blob2clob (l_blob BLOB)
    RETURN CLOB
    IS
    l_clob CLOB;
    l_src_offset NUMBER;
    l_dest_offset NUMBER;
    l_blob_csid NUMBER := DBMS_LOB.default_csid;
    v_lang_context NUMBER := DBMS_LOB.default_lang_ctx;
    l_warning NUMBER;
    l_amount NUMBER := dbms_lob.lobmaxsize;
    BEGIN
    IF l_blob is null
    THEN
    return null;
    ELSE
    DBMS_LOB.createtemporary (l_clob, TRUE);
    l_src_offset := 1;
    l_dest_offset := 1;
    l_amount := NVL(DBMS_LOB.getlength (l_blob),0);
    DBMS_LOB.converttoclob (l_clob,
    l_blob,
    l_amount,
    l_src_offset,
    l_dest_offset,
    0,
    v_lang_context,
    l_warning
    RETURN l_clob;
    END IF;
    END;
    END SHB_package;

    thanks,function is working fine
    issue duo to i used under informatice and bug in informatica
    Edited by: user8929623 on Jan 17, 2010 1:39 AM

  • How do I copy a page from one Pages document to another using Pages 5.0?

    I posted this question on another page, and haven't recieved an answer to it yet. However I have found a temporary solution, so I am posting this here in case anyone else has a similar problem.
    The issue here is that I have just upgraded from Snow Leopard to Maverick (10.9.1), and my Pages also upgraded (to 5.0.1), altering my Pages documents. This is the issue, as as far as I can see the new Pages does not offer some of the basic needs that the old Pages did! In other words it is worse than the previous version.
    Using the upgraded new Pages 5.0.1 seems to result in some major editing problems for me. If you upgrade, make sure you KEEP the old version of Pages 09 (v 4.3). That is what has saved me!  If you have the same problems I have had - explained below, you will still be able to close the new version and open your Pages document in the old version, provided it is not a new Pages document. If it is, it will be possible to export it as a Pages 09 document and edit properly.
    After upgrading to the new Pages 5.0.1, when I open documents in Pages and try and copy a section from one document to another (easy before using the thumbnails) many of the Menu items previously available are visible but appear faded and are not possible, including Insert>Section Break/Page Break/Page Number and Edit>Cut/Copy/Delete/Undo/Redo
    This even happens if I duplicate the Pages document and try and do any of these from the Duplicate (which should be an easily editable copy).
    My solution has been to simply open all Pages documents that Iwant to edit (or may want to edit in future) in the old Pages app (v 4.3), which I never got rid of. That has meant I can continue editing and copying a section (of 1 or more pages) from one Pages document to another.
    If anyone reading this has figured out a way to edit Pages documents using the new version 5.0.1 please post an explanation, and I will try it!

    And there are those who don't like me repeating the same message over and over again in this forum!
    Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after Exporting your files to Pages '09, and rate/review it in the App Store, then get back to work.
    Peter

  • How can one print a particular page or pages from a Word Document using ActiveX or any other technique?

    I've been trying to print  a few pages from a Word document.
    Currently I am able to print the entire document using some ActiveX techniques.
    There seems to be facilities for selecting the particular pages, however so far I cannot get them to work.
    I have tried the From/To and the Pages in the PrintOut invoke node.
    And as you will see I have also tried the Range node.
    Anyone have some ideas on how to do this?
    Please see the attached vi.
    Thanks,
    Chris
    Attachments:
    ActiveX Print.vi ‏15 KB

    Please stick to your original post.
    Please have some patience.

  • How do I Load a clob from an XML field in an XMLTYPE using XMLTABLE ?

    I am trying to load data into a CLOB from a XML field using XMLTABLE.
    I have a SUMMARY xml field with over 100 K of data (potentialy)
    and I can load all the other datatype fields to columns but can not load the xml fields over 4000 characters.
    example
    First I create a table of XMLTYPE. I need to sqlload new files in at regular intervals.
    Create table WEB_XML of XMLTYPE;
    Then I create my relational table....
    create table WEB_WORKING
    request_id varchar(10),
    ref_number varchar(20),
    summary clob
    The I use the .ctl file to sqlload the xml data in
    LOAD DATA
    INFILE *
    INTO TABLE WEB_XML
    append
    xmltype(XMLDATA)
    ext_fname filler char(90),
    XMLDATA LOBFILE(ext_fname) TERMINATED BY EOF
    BEGINDATA
    XMLFILE1.xml
    After loading the WEB_XML table using sqlldr, I try to load my relational table using XMLTable
    INSERT into WEBBAR_WORKING
    request_id ,
    ref_number ,
    summary
    SELECT X.* FROM WEB_XML P2,
    XMLTable ( '//Request//REQUESTVIEW'
    PASSING P2.object_value
    COLUMNS
    "request_id" VARCHAR(10) PATH 'REQUEST_ID',
    "ref_number" VARchar(20) PATH 'REF_NUMBER',
    "SUMMARY" clob PATH 'SUMMARY'
    ) AS X;
    This gives an error saying its not expecting clob
    My XML looks somthing like
    -<Request>
    -<REQUESTVIEW>
    <REQUEST_ID>3140</REQUEST_ID>
    <ref_number>2003-04-02</RECEIVED_DATE>
    <SUMMARY>
    OVER 100 K of data
    </SUMMARY>
    </REQUESTVIEW>
    </Request>

    ok
    that helped lot, im getting there however some more help please
    This SQL
    SELECT request_id, recieved_by, X.SUMMARY.getClobVal()
    FROM WEB_XML P2,
    XMLTable
    '//Request//REQUESTVIEW'
    PASSING P2.object_value
    COLUMNS
    "request_id" VARCHAR(10) PATH 'REQUEST_ID',
    "received_by" VARCHAR(10) PATH 'RECEIVED_BY',
    "SUMMARY" xmltype PATH 'SUMMARY'
    ) AS X;
    SELECT request_id, recieved_by, X.SUMMARY.getClobVal()
    ERROR at line 1:
    ORA-00904: "RECIEVED_BY": invalid identifier
    If I use the X.request_id, X.received_by ......
    i get the error message
    Package or function is in aan invalid state.
    But this SQL was successful in getting the clob by itself but with the XML tgs around it still, how do I strip the XML tags from around this result ?
    SELECT X.SUMMARY.getClobVal()
    FROM WEBBAR_XML P2,
    XMLTable
    '//Request//REQUESTVIEW'
    PASSING P2.object_value
    COLUMNS
    "SUMMARY" XMLTYPE PATH 'SUMMARY'
    ) AS X;
    ----------------------------------------------------------

  • Error While reading CLOB from Oracle using WebLogic Connection Pool, Works fine with out using pool

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

  • ORA-22275 Invalid lob locator when using CLOB from a view

    Hi,
    I am having problems when passing a CLOB from a "Union all" view to a function. I get an ORA-22275 error when trying to construct an XmlType from the CLOB and
    the CLOB originates from a view. If the CLOB originates from a table, eveyting works fine. Here is the code, that reproduces the problem
    CREATE TABLE testclob
        (field1                         CLOB)
    -- insert some data
    insert into testclob values ('<a/>');
    -- Define a clob view over some tables
    create or replace view v_testclob
    (field1)
    as
    select field1 from testclob
    union all
    select field1 from testclob; -- in reallity I use different tables
    -- Creat a functions that proceses the CLOB
    CREATE OR REPLACE
    function MyFunction(v_myClob clob) return VARCHAR2
    IS
       myXML XMLTYPE;
    BEGIN
      select xmltype(v_myClob) into myxml from dual; -- the view crashes ** HERE **
      -- code ommited
      return 'some data';
    END;
    -- Try to use the function:
    -- Selecting from a table works OK
    select myfunction(field1) from testclob;
    -- Selecting from the view crashes
    select myfunction(field1) from v_testclob;
    Error: ORA-22275: invalid LOB locator specified ORA-22275: invalid LOB locator specified ORA-06512: at "D_TEST.MYFUNCTION", line 6
    -- I using the following version:
    select * from v$version;
    -- 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 The only workaround I have found is to use substr
      select xmltype(dbms_lob.substr(v_myClob)) into myxml from dual; -- workaround.. but this mght trucnate my data.
    What am I doing wrong?
    Matej

    You need to apply the latest patchset for your version of the database on your version of the operating system:
    SQL> CREATE TABLE testclob
      2      (field1                         CLOB)
      3
    SQL> /
    Table created.
    SQL>
    SQL> -- insert some data
    SQL> insert into testclob values ('<Data>Testing</Data>')
      2  /
    1 row created.
    SQL>
    SQL> -- Define a clob view over some tables
    SQL>
    SQL> create or replace view v_testclob
      2  (field1)
      3  as
      4  select field1 from testclob
      5  union all
      6  select field1 from testclob
      7  /
    View created.
    SQL>
    SQL> -- Creat a functions that proceses the CLOB
    SQL>
    SQL> CREATE OR REPLACE
      2  function MyFunction(v_myClob clob) return VARCHAR2
      3  IS
      4     myXML XMLTYPE;
      5  BEGIN
      6
      7    select xmltype(v_myClob) into myxml from dual; -- the view crashes ** HERE **
      8    -- code ommited
      9    return 'some data';
    10  END;
    11
    12  /
    Function created.
    SQL> -- Try to use the function:
    SQL> -- Selecting from a table works OK
    SQL> select myfunction(field1) from testclob;
    MYFUNCTION(FIELD1)
    some data
    SQL>
    SQL>
    SQL> -- Selecting from the view crashes
    SQL> select myfunction(field1) from v_testclob;
    MYFUNCTION(FIELD1)
    some data
    some data
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    SQL>

  • When I try to delete page(s) from a PDF document I created, I geth the following message: "One or more pages are in use and could not be deleted." Any suggestions?

    When I try to delete page(s) from a PDF document I created, I geth the following message: "One or more pages are in use and could not be deleted." Any suggestions?

    I sent an email to TerraGo Support and they sent the following response: "This has bug has been discovered and our development team is quickly creating a patch to resolve the problem. The patch should be available within a week or two. For your reference, the bug number assigned to this case is: 3620. Check back in about two weeks and hopefully the patch will be available. Again, I apologize for the inconvenience."

  • How to fill an oracle CLOB with a XML document using Unicode UTF8

    Hi,
    I'm working with C# and oracle database v8.1.7 (release 3), and i'm having some problems to fill correctly an oracle CLOB parameter with XML document using UTF8 encoding.
    It works fine with "Encoding.Unicode" but not with "Encoding.UTF8". The problem is that i can't use Unicode (UTF16) with oracle 8.
    Can someone help me ? Thanks.
    Here is my code.
    OracleTransaction tx = conn.BeginTransaction();
    OracleCommand cmd = conn.CreateCommand();
    cmd.Transaction = tx;
    cmd.CommandText = "declare xx clob; begin dbms_lob.createtemporary(xx, false, 0); :tempclob := xx; end;";
    cmd.Parameters.Add(new OracleParameter("tempclob", OracleType.Clob)).Direction = ParameterDirection.Output;
    cmd.ExecuteNonQuery();
    OracleLob tempLob = (OracleLob)cmd.Parameters[0].Value;
    MemoryStream MemStrm = new MemoryStream();
    XmlTextWriter writer = new XmlTextWriter(MemStrm, Encoding.UTF8);
    writer.Formatting = Formatting.Indented;
    WriteXMLExample(writer, "MSFT", 74.125, 5.89, 69020000);
    writer.Close();
    cmd.Parameters.Clear();
    cmd.CommandText = "test_xml";                    
    cmd.CommandType = CommandType.StoredProcedure;
    tempLob.Write(MemStrm.GetBuffer(), 0, MemStrm.GetBuffer().Length );
    tempLob.Position = 0;
    cmd.Parameters.Add(new OracleParameter("xml_inout", OracleType.Clob)).Value = (OracleLob) tempLob;
    cmd.ExecuteNonQuery();
    Console.WriteLine( "Param 0 = " + cmd.Parameters[0].Value.ToString() );
    tx.Commit();

    Hi,
    I'm working with C# and oracle database v8.1.7 (release 3), and i'm having some problems to fill correctly an oracle CLOB parameter with XML document using UTF8 encoding.
    It works fine with "Encoding.Unicode" but not with "Encoding.UTF8". The problem is that i can't use Unicode (UTF16) with oracle 8.
    Can someone help me ? Thanks.
    Here is my code.
    OracleTransaction tx = conn.BeginTransaction();
    OracleCommand cmd = conn.CreateCommand();
    cmd.Transaction = tx;
    cmd.CommandText = "declare xx clob; begin dbms_lob.createtemporary(xx, false, 0); :tempclob := xx; end;";
    cmd.Parameters.Add(new OracleParameter("tempclob", OracleType.Clob)).Direction = ParameterDirection.Output;
    cmd.ExecuteNonQuery();
    OracleLob tempLob = (OracleLob)cmd.Parameters[0].Value;
    MemoryStream MemStrm = new MemoryStream();
    XmlTextWriter writer = new XmlTextWriter(MemStrm, Encoding.UTF8);
    writer.Formatting = Formatting.Indented;
    WriteXMLExample(writer, "MSFT", 74.125, 5.89, 69020000);
    writer.Close();
    cmd.Parameters.Clear();
    cmd.CommandText = "test_xml";                    
    cmd.CommandType = CommandType.StoredProcedure;
    tempLob.Write(MemStrm.GetBuffer(), 0, MemStrm.GetBuffer().Length );
    tempLob.Position = 0;
    cmd.Parameters.Add(new OracleParameter("xml_inout", OracleType.Clob)).Value = (OracleLob) tempLob;
    cmd.ExecuteNonQuery();
    Console.WriteLine( "Param 0 = " + cmd.Parameters[0].Value.ToString() );
    tx.Commit();

Maybe you are looking for

  • HP dv6 DVD drive not reading DVD's

    Hi, my HP dv6 is currently running windows 7 and for some reason it will not read DVD's. It will read CD's just fine no matter what's on them. I've tried to uninstall and reinstall the driver and find other sollutions and so far nothing has worked. P

  • Window 7 with Time Capsule

    I keep getting an error (86) when I try to connect my Time Capsule with my PC that's using Window 7! The error message keeps telling me that the password is not correct.But the Time Capsule is working fine with my Mac Pro and another PC that's using

  • Slow network on a6000 plus and camera quality worst after recent upgrade.

    The recent smartphone given by the lenovo is good but the network is too slow as compared to other mobile companies who work in the same network area. Also the recent upgrade of vibe ui makes the camera quality worst. There seems grains now in the ca

  • Trying to load quickbooks 2013, says I need 1GB to load but only have 767MB, computer has 5GB memory

    Quickbooks 2013 says that I do not have enough memory to load the software but the computer has 5 times as much memory as needed. How to I get the software to load?

  • Color Changes while using Text Messaging on iOS5

    Ever since I updated my iPhone 4 software to the new iOS5 I've notice something a little different with the text messaging.  Some of the text messages are bubbled or highlighted in a light blue while others are the standard green color.  They have al