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