INSERT into BLOB

I want to insert image/bFile into blob data.
I need the insert statement on that data.
Thanx.. Ratan

Hi
Check the below Documentation:
http://download-west.oracle.com/docs/cd/A97630_01/appdev.920/a96591/adl07mds.htm#119691
Regards
RK

Similar Messages

  • Error while inserting into blob column through PL/SQL

    Hi All,
    I am trying to insert into column having blob as datatype.
    INSERT INTO imagedb(image_name, content,description) VALUES ('logo.png',
    ?{file 'c:\logo.png'}, 'logo');
    it gives me error Unknown JDBC escape sequence:
    Is there anything wrong in above insert syntax for inserting into BLOB data type.
    Can any body please help me.
    Regards,
    Hiren

    It is not valid SQL as far as Oracle SQL is concerned. I assume that the file construct is suppose to replace that with the contents of the file?
    What happens when the file size exceeds the max length of the SQL command?
    And do you have any idea what will happen to the SQL Shared Pool on Oracle that needs to store the entire SQL command for every single SQL command passed to it? The whole purpose of the Shared Pool is for storing shared SQL. Not non-sharable SQL containing hardcoded values.
    Bind variable are to be used.. if you expect Oracle to perform like only Oracle can.
    And my bet is that you have not even bothered to read [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/toc.htm]Oracle® Database Application Developer's Guide - Large Objects guide....

  • Insert into blob column from form6i

    Dear all,
    I have a question....
    I need to develop an application with form6i which gets the filename and path from user and inserts the content of the file in a table with blob column...
    the files may be in any format...How can I do it in oracle form 6i..our database is 10g...
    If anybody has a sample please send me :[email protected]
    ThanX
    Farnaz

    If you want to insert a string and next convert to BLOB, you use the next SQL
    PreparedStatement ps = connectionObject.prepareStatement("INSERT INTO TEST_BLOB(NO,STR) VALUES(?,TO_BLOB(?))");and next
    ps.setInt(1, "1");
    ps.setString(2,"sample string here");

  • Insert into blob(image) sql server 2000

    hello
    i want enter one image for example fish.jpg into blob into
    sql server 2000 plz help me...

    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.zip
    this contains samples for using blob with oracle. use the idea for your code.

  • Insert into Blobs

    I need to export contents from a table with blob in our local environment and upload this data in client environment. Can I use a script to do this? How?

    Sqlplus can't see any blobs. You can try to use LONG buffer and DBMS_LOB package. But I think, that it is easily to write some code in .net or java.

  • How can I Insert a BLOB into a Table from Java?

    I have a Java class that creates an xml file from data in a non-sql data source. After it successfully creates and saves the file it inserts a record into an Oracle table to log the fact that an xml file was created.
    Now the guy in the warehouse wants to get an email with the file attached. I have been looking into the apex_mail package, because we already have a procedure using htmldb_mail. However, that procedure is on our old server with HTMLDB 1.6 and it is not sending any attachments.
    I think I have most of the apex_mail worked out, but I'm stuck on the blob thing. This is what I have so far:
    * The Java program creates a String object called xmlDoc
    * After xmlDoc is fully constructed, the file is written to the (Linux) server. This is accomplished with the following:
    // writing the xmlDoc
    fileDest = "/home/ewh/XMLOUT/";
    fileName = "OrderEW_"\+orderNbr\+"_"\+ticketNbr\+".xml";
    FileWriter fstream = new FileWriter(fileDest+fileName);
    BufferedWriter out = new BufferedWriter(fstream);
    out.write(xmlDoc);
    out.close();
    * Next I insert a record into the log file with:
    // Add a record to the Oracle order_email table to let the mail process know that
    // a new xml file is ready to be e-mailed to operations.
    emailLogInsertQuery = " insert into ewh.order_email ( file_name, create_date ) ";
    emailLogInsertQuery += " values ('"\+fileName\+"', sysdate)";
    oraAction = oraStmt.executeUpdate( emailLogInsertQuery );
    All of this is working fine so far. Now, I have added a blob type field to the order_email table, but I have no idea what to stick in there so that I have everything that apex_mail.add_attachment needs.
    Here's a description of the order_email table:
    SQL> desc ewh.order_email;
    Name Type Nullable Default Comments
    FILE_NAME VARCHAR2(30) Y
    FILE_BLOB BLOB Y
    CREATE_DATE DATE Y
    SEND_DATE DATE Y
    Thanks ever so much,
    Gregory
    Edited by: Canis Polaris on Jun 10, 2009 2:10 PM - Added escapes as necessary to show the plus signs around Java variables.

    Hi,
    From within APEX one can enter blob data in database tables, view the data and also update the data. Also one can send a blob attachment in an email.
    May be you can follow a combination of the following OBEs to insert BLOB data and send BLOB data from APEX:
    http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
    http://www.oracle.com/technology/obe/apex/apex31nf/apex31email.htm
    -Priyanka

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • Error while insert into database using DB adpater for Field BLOB

    Hello All
    I am trying to tranfer data from Database A to Database B using Oracle DB adapter.
    Table of databse A contains field BLOB, which cotains the resume /doc file.After transformation in Database B format ,while invoking the DB adapter to insert, I am getting follwing error
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
    </part><part name="summary"><summary>file:/u01/bpelvinc/product/10.1.3.1/OracleAS_1/bpel/domains/viapps/tmp/.bpel_ERecuit_Application_New_1.0_d1c2b2149a9e0c7c745279667ad1fc84.tmp/DB_APPL_111.wsdl [ DB_APPL_111_ptt::insert(RtmApplicantCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [DBAPPL111.RtmApplicant]. [Caused by: Error in encoded stream, got 2]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [DBAPPL111.RtmApplicant]. [Caused by: Error in encoded stream, got 2]
    Caused by Exception [TOPLINK-3001] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ConversionException
    Exception Description: The object [xs:base64Binary 43524541544520544193B0D0A], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp].
    Internal Exception: java.io.IOException: Error in encoded stream, got 2.
    </summary>
    </part><part name="detail"><detail>
    Exception Description: The object [xs:base64Binary 4352E616D65293B0D0A], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp].
    Internal Exception: java.io.IOException: Error in encoded stream, got 2</detail>
    </part></bindingFault>
    Please let me know ,what are the possibilities.
    Thanks
    Satendra

    Hi...
    well... My flow goes like Pl/SQl ---> BPEL,
    Now PL/SQL code reads data from the Database A and Send it to BPEL which inserts into the Database B.
    with respest to above design, I found the problem in pl/sql block.
    Actually I am sending a BLOB field in the soap message. but some how pl/sql now ablt tot handle that or sending some wrong data.
    my question is how to send a blob filed data to bpel using pl/sql block. this the reasion I am getting above error.
    Thanks

  • Sample insert into table with BLOB column

    This is my first opportunity to work with BLOB columns. I was wondering if anyone had some sample code that shows the loading of a blob column and inserted into the table with a blob column.
    I have to produce a report (including crlf) and place it into a blob column. The user will download the report at a later time.
    Any suggestions / code samples are greatly appreciated!!!!

    You can enable string binding in TopLink.
    login.useStringBinding(int size);
    or you could enable binding in general,
    login.bindAllParameters();

  • Unable to insert large blob data into DB

    Hi,
    I have written a piece of code which serializes a java object and writes it into a blob in DB.
    It works pretty fine for small objects of around 3 to 4 KB size, but I start getting trouble with larger objects.
    Here's my piece of code -
    private final static String QUERY_INSERT_AUDIT_DATA = "INSERT INTO " +
    "KAAS_AUDIT_DATA(object_id, object_type_cd, create_by, summary_data) VALUES (?, ?, ?, ?)";
    byte [] byteArray;
    bos = new ByteArrayOutputStream();
    oos = new ObjectOutputStream(bos);
    oos.writeObject(summaryData);
    oos.flush();
    oos.close();
    byteArray = bos.toByteArray();
    bos.close();
    ByteArrayInputStream bais = new ByteArrayInputStream(byteArray);
    BufferedInputStream buffInputSteam = new BufferedInputStream(bais);
    trace("addAuditSummary() : byteArray " + byteArray.length);
    trace("addAuditSummary() : buffInputSteam.available " + buffInputSteam.available());
    trace("addAuditSummary() : Calling Query to populating data");
    statement = conn.prepareStatement(QUERY_INSERT_AUDIT_DATA);
    statement.setString(1, objectId.toUpperCase());
    statement.setInt(2, objectType);
    statement.setString(3, createdBy);
    statement.setBinaryStream(4, buffInputSteam, buffInputSteam.available());
    statement.executeUpdate();
    statement.close();
    Basically, I am converting the object to BufferedInputStream to sent it to the BLOB(summary_data).
    The error I get is -
    ][30 Nov 2007 10:38:08] [ERROR] [com.hns.iag.kaas.util.debug.DebugDAO] addAuditSummary() : SQL exception occured while adding audit summary data for Object: BUSINESS_SO_BASE_DEAL
    ]java.sql.SQLException: Io exception: Connection reset by peer.
    at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava/lang/String;Ljava/lang/String;I)V(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava/lang/Object;)V(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava/io/IOException;)V(DBError.java:334)
    at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(Ljava/io/IOException;)V(TTC7Protocol.java:3675)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(BBI[B[Loracle/jdbc/dbaccess/DBType;[Loracle/jdbc/dbaccess/DBData;I[Loracle/jdbc/dbaccess/DBType;[Loracle/jdbc/dbaccess/DBData;I)V(Optimized Method)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(Loracle/jdbc/dbaccess/DBStatement;B[BLoracle/jdbc/dbaccess/DBDataSet;ILoracle/jdbc/dbaccess/DBDataSet;I)I(TTC7Protocol.java:1141)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()V(Optimized Method)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()I(Optimized Method)
    at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate()I(PreparedStatement.java:94)
    at com.hns.iag.kaas.util.debug.DebugDAO.addAuditSummary(Ljava/lang/String;ILjava/lang/Object;Ljava/lang/String;)V(DebugDAO.java:794)
    at com.hns.iag.kaas.servlets.sdm.action.SummaryAction.perform(Lcom/hns/iag/kaas/servlets/sdm/core/Event;Lcom/hns/iag/kaas/servlets/sdm/core/UserContext;)Ljava/lang/String;(SummaryAction.java:246)
    at com.hns.iag.kaas.servlets.sdm.SDMControllerServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(SDMControllerServlet.java:213)
    at com.hns.iag.kaas.servlets.sdm.SDMControllerServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(SDMControllerServlet.java:128)
    at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6354)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    I would really appreciate any help.
    Thanks
    Saurabh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    I would say, most likele BufferedInputStream.available() returns an incorrect length. available() does not return the length of the InputStream. See the javadocs for the details
    Additionally: it doesn't make sense at all to wrap the ByteArrayInputStream with a BufferedInputStream, the array is in memory already, so there is no need to buffer the read access to it (you are simply adding more overhead).
    Remove the BufferedInputStream (passing the bais directly to the setBinaryStream() method) and use byteArray.length to indicate the length of the data

  • Inserting a filename into BLOB

    There is a lot of talk about inserting a file into BLOB or
    just the file path and storing the file locally. I've decided to
    store the file on the server but what I don't know is how to
    capture that path and file name so I can insert it into the MySQL
    database and later retrieve it when the display page is loaded.
    Also, what is the download side of this? When the page is
    called is there a 'best way' to serve up the file to the user?
    Any sample code for this type of thing would really help me
    get past this sticking point.
    Thank you in advance.
    I'm using a CF8/MySQL 5.x setup. Attached is my upload
    code...

    Bob,
    Thanks for the code, but won't that actually store the
    document in the database rather than just storing the file path? I
    guess I was thinking it would be smarter to store the path in the
    DB rather than the actual file itself. I know this is an invitation
    to a heated discussion as I've found many examples of it here in
    the forums...
    Maybe I'm just misreading the code. And, yes, the intent is
    to store PDF files for the client's app.
    The intent is that when a user visits page 'x' they see a
    short description of a lesson then click on a link to download the
    pdf resource for that particular lesson. Maybe there is a better
    way to do this, I don't know. I'm relatively new at this type of
    situation.
    Thank you for your quick reply!

  • Inserting Image into BLOB field from URL

    Is it possible to insert an image into a BLOB field from a URL? I don't have access to the filesystem on the server and I have a page that uses PL/PDF to generate dynamic PDF files from data I pull from the database. I would like to include my companies official header with logo on the top of the PDFs I generate and need to somehow get the image which I currently have uploaded to the images section in Application Express and can access from the "Shared Components => Images" section of the Application Builder. I just want to be able to either query whatever table holds those images or copy the image I need to a blob field in one of my tables so I can use it in my PDF document.
    The other alternative (which is what I first mentioned above) would be to try and perform an insert into the BLOB field in my table but the location of the image file would be like "http://www.myportal.com:7777/pls/htmldb/wwv_flow_file_mgr.get_file?p_security_group_id=1234567&p_flow_id=111&p_fname=myimage.jpg".
    Is this possible? If not, what can I do?
    Thanks in advance.

    The reason why I am asking this question in this forum is two-fold:
    1. I am using Application Express (AE).
    2. Since I am using AE all images that I upload to my workspace are stored in a table in a database and not as an actual file in a directory structure like in Windows etc. This being the case, I can't ever reference any of the files that I upload to my workspace in order to insert them into my BLOB field unless I know their physical location on disk (which of course does not exist b/c they are stored in the AE database somewhere). If I knew AE's database and table structure I could do a "select into ..." from whatever table stores my uploaded images and save those images to my own custom table in my BLOB field.

  • Problem with inserting two BLOBs into a table using setBinaryStream

    DBMS 9.2.0.1.0, Oracle JDBC driver 10.1.0.2.0
    The following code insert in one INSERT two BLOBs
    into two columns using PreparedStatement.setBinaryStream(). When the size of the of at least one blob exceeds
    some limit (? 2k, 4k ?), the values are swapped and
    inserted into wrong columns.
    Please, is this a problem in JDBC driver?
    ====================================================
    import java.io.ByteArrayInputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.sql.Statement;
    * Test - two BLOBs swapped problem.
    * If size of the blob is larger that some treshold, they are swapped in the database.
    public class BlobSwapTest {
    private static Connection getConnection() throws SQLException {
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    } catch (ClassNotFoundException cnfe) {
    throw new SQLException("ClassNotFoundException: " + cnfe.getMessage());
    return DriverManager.getConnection("jdbc:oracle:thin:@//HOST:1521/DB", "USER", "PSWD");
    private static void createTable() throws SQLException {
    Connection conn = getConnection();
    Statement stmt = null;
    try {
    stmt = conn.createStatement();
    try {
    stmt.execute("DROP TABLE BlobTest2");
    } catch (SQLException e) {
    System.err.println("Table BlobTest2 was not deleted: " + e.getMessage());
    stmt.execute(
    "CREATE TABLE BlobTest2 ("
    + " pk VARCHAR(512), "
    + " blob BLOB, "
    + " blobB BLOB, "
    + " PRIMARY KEY (pk)"
    + ")"
    } finally {
    try {
    if (stmt != null) stmt.close();
    } finally {
    conn.close();
    public static void main(String[] args) throws SQLException {
    createTable();
    Connection conn = getConnection();
    PreparedStatement pstmt = null;
    try {
    conn.setAutoCommit(false);
    pstmt = conn.prepareStatement("INSERT INTO BlobTest2 VALUES (?,?,?)");
    final int size = 5000; // change the value to 500 and the test is OK
    byte[] buf = new byte[size];
    byte[] buf2 = new byte[size];
    for (int i = 0; i < size; i++) {
    buf = 66;
    buf2 = 88;
    pstmt.setString(1, "PK value");
    pstmt.setBinaryStream(2, new ByteArrayInputStream(buf), size);
    pstmt.setBinaryStream(3, new ByteArrayInputStream(buf2), size);
    pstmt.executeUpdate();
    conn.commit();
    } finally {
    if (pstmt != null) pstmt.close();
    conn.close();
    ====================================================

    See my response in the JVM forum.

  • BLOB Insert into SQL Server2000

    Dear All,
    I have problem with  insert the BLOB object into MSSQLServer 2000 in WebDynpro.
    Please help me how to solve it?
    Best Regards,
    Mukesh.

    Hi Sweety,
    Can you provide some more information? 
    The script for each of your queries.  (looking especially at how you are using single quotes around the Param properties for different data types)
    Are you using an Command SQL Query for the insert?
    Why are you using the Calculation action block instead of using the Expression Editor for the calculation?
    Regards,
    Mike

  • Problem inserting Stream or ByteArray into Blob field.

    Hello,
    I am attempting to insert a file that has been converted into a byte array and also an input stream. When the file is less than 50kb it does successfully get inserted into the Blob field. When it is larger, it fails with the following stack trace:
    06/12/07 10:20:57 java.sql.SQLException: Invalid argument(s) in call
    06/12/07 10:20:57 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    06/12/07 10:20:57 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    06/12/07 10:20:57 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    06/12/07 10:20:57 at oracle.jdbc.dbaccess.DBItem.setArrayData(DBItem.java:270)
    06/12/07 10:20:57 at oracle.jdbc.dbaccess.DBItem.setArrayData(DBItem.java:246)
    06/12/07 10:20:57 at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2484)
    06/12/07 10:20:57 at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1219)
    06/12/07 10:20:57 at oracle.jdbc.driver.OraclePreparedStatement.setBytes(OraclePreparedStatement.java:2307)
    06/12/07 10:20:57 at com.evermind.sql.PreparedStatementBCELProxy.setBytes(PreparedStatementBCELProxy.java:201)
    06/12/07 10:20:57 at mil.dla.finance.issueTracker.AbstractIssueTrackerAction.insertNewIssueItem(AbstractIssueTrackerAction.java:265)
    06/12/07 10:20:57 at mil.dla.finance.issueTracker.WriteIssueAction.execute(WriteIssueAction.java:181)
    06/12/07 10:20:57 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    06/12/07 10:20:57 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    06/12/07 10:20:57 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    06/12/07 10:20:57 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    06/12/07 10:20:57 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    06/12/07 10:20:57 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    06/12/07 10:20:57 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    06/12/07 10:20:57 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    06/12/07 10:20:57 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    06/12/07 10:20:57 at mil.dla.finance.common.filters.UserAuthFilter.doFilter(UserAuthFilter.java:201)
    06/12/07 10:20:57 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
    06/12/07 10:20:57 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
    06/12/07 10:20:57 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    06/12/07 10:20:57 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    06/12/07 10:20:57 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    06/12/07 10:20:57 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    06/12/07 10:20:57 at java.lang.Thread.run(Thread.java:534)
    Any assistance would be greatly appreciated.

    I thought I had found the answer here: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/lob/LobToSP.html
    I adapted the Clob code to a Blob:
    private BLOB getBLOB( byte[] array)
    throws Exception {
    BLOB b = null;
    try {
    // create a new temporary BLOB
    b = BLOB.createTemporary( conn, true, BLOB.DURATION_SESSION );
    // Open the temporary BLOBin readwrite mode to enable writing
    b.open( BLOB.MODE_READWRITE );
    b.setBytes(array);
    // Get the output stream to write
    } catch ( Exception exp ) {
         // Free BLOB object
    b.freeTemporary( );
    // do something
    return b;
    however, it appears that the BLOB being returned is null, and when sent to the DB, nothing is actually written. So any help/suggestions would be greatly appreciated.
    Message was edited by:
    SFBell09

Maybe you are looking for