Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Big XML document as blob in firebird database

843859Dec 5 2007 — edited Dec 5 2007
Hi! I'm having some problems trying to use blob to store an XML document on a Firebird database. I'll try to make this simple: I'm reading a CD and copying the structure to an xml document (org.w3c.dom.Document), and i need to store it on a firebid database. The thing is that the document is really huge and when i try to insert it as text i get an exception:

org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544726. Error reading data from the connection.
Reason: Error reading data from the connection.

Here is the code to insert:
StringBuffer buffer = new StringBuffer();
        printDOM(catalog.getXMLDom(), buffer);
        new DBInsert("INSERT INTO CD (NAME, CATEGORY, CATALOG_TYPE, CATALOG_DESCRIPTION, CATALOG_UBICATION, CATALOG_FORMAT, XML) VALUES ('" + catalog.getName() + "','" + category + "','" + catalog.getCatalogType() + "','" + catalog.getCatalogDescription() + "','" + catalog.getCatalogUbication() + "','" + catalog.getCatalogFormat() + "','" + buffer.toString() + "')"); 
The buffer has all the xml structure which i took from the Document object, and when i read from the database it's supposed to restore the document from the xml structure.
I'd be very happy if someone gives me a clue with that :) I have no idea how to insert and how to read the blob. The database column is defined with this domain CREATE DOMAIN BXML AS
BLOB SUB_TYPE 1 SEGMENT SIZE 4096 CHARACTER SET NONE;

Thanks for your time!
Fede

Edited by: fedebobbio1 on Dec 5, 2007 6:24 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2008
Added on Dec 5 2007
0 comments
660 views