From: Arno B. <fir...@ab...> - 2004-08-31 15:16:10
|
Hi, Jim et all, How will binary blobs be handled? This goes for plain SQL as well -=20 We now can insert text-blobs via a simple (non-parameterized) SQL statement, but we cannot insert/update binary blobs yet. There's no problem on the database side; IscDbc takes care of it = automatically. All it takes is a call to PreparedStatement::setBytes = and IscDbc takes care of the rest. The harder part of the question is how a binary blob is represented in = XML. The problem is not encoding -- base64 or anything similar suffices = -- but specifying the encoding. Representing each value as an attribute = on the "row" element doesn't leave much wiggle room. The solution is = simple: Represent the binary blob as a separate "value" element under = the "row" element like this: <row TEXT=3D"Do you want to roll back your updates?" CODE=3D"10351" = NUMBER=3D"351" > <column name=3D"ICON" encoding=3D"base64" value=3D"<gook goes = here>"/> </row> =20 As escape mechanism it provides all sorts of opportunities for = extensible mischief. If you put blob in separate element i think you must put every field = inside separate element, but yes as already meantioned this will explode = xml file. for binary blobs use xml CDATA : http://www.w3schools.com/xml/xml_cdata.asp Regards, Arno Brinkman ABVisie -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Firebird open source database (based on IB-OE) with many SQL-99 features = : http://www.firebirdsql.org http://www.firebirdsql.info http://www.fingerbird.de/ http://www.comunidade-firebird.org/ Support list for Interbase and Firebird users : fir...@ya... Nederlandse firebird nieuwsgroep : news://newsgroups.firebirdsql.info |