Re: VW --> Bianary file into CLOB or BLOB
- From: maarten <maarten.mostert@xxxxxxxxxx>
- Date: Sat, 22 Jul 2006 05:48:11 +0200
In fact the remaining poblem I have is not in transferring the BLOB to the database as I manage this on both PostgreSQL, Oracle and ODBC following the documentation.
Having said that, only PostgreSQL does big-blobs out of the Glorp box. Oracle prefers updating a small blob to a big one using a proxy but ODBC only accepts bindings and doesn't support updates obliging you to create a new index for the blob you only want to update.
My outstanding problem was to create a valid ByteArray from no matter what file as I previously used the ByteArray coming from ImageReader.
The following statement however seems to give me a ByteArray through an MSCP1252String (I don't know where that stands for though and inspect gives me lots of black squared characters, but I try of from here).
'mynew.pdf' asFilename contentsOfEntireFile asByteArrayEncoding: #default
PS I did somewhere expect somebody to say do this with XML,..........
Alan Knight a écrit :
It shouldn't be very difficult. You probably want to use binding (at least if you're on Oracle, the VW Postgresql driver doesn't really do binding in a meaningful way, so you're actually better off without it). You can just bind a ByteArray to the statement. There is some discussion in the Database Application Developer's Guide, page 141 for Oracle and 152 for ODBC..
"Joachim Geidel" <joachim.geidel@xxxxxxxxxxxx> wrote in
news:1153494544.912400.267300@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Hi Maarten,
I am using VW and I would like to read some binary file and load ityou could have a look at how Store stores LOBs, starting at
in and of from a database through CLOB or BLOB.
myByteArray:='myFirstSong.mp3' asFilename
doSomeUnknownActionOnFullContents.
Store.Blob>>installMultipleChunks. You would have to load the Store
support for your target database to see the necessary code. The
PostgreSQLEXDI, the OracleEXDI and probably other support BLOBs, but
how to do it is not documented in the Database Application Developers
Guide, and the comments in the code are, hmm, sparse.
HTH,
Joachim Geidel
- Follow-Ups:
- Re: VW --> Bianary file into CLOB or BLOB
- From: Alan Knight
- Re: VW --> Bianary file into CLOB or BLOB
- References:
- VW --> Bianary file into CLOB or BLOB
- From: maarten
- Re: VW --> Bianary file into CLOB or BLOB
- From: Joachim Geidel
- Re: VW --> Bianary file into CLOB or BLOB
- From: Alan Knight
- VW --> Bianary file into CLOB or BLOB
- Prev by Date: Re: New Smalltalk Blog
- Next by Date: Re: New Smalltalk Blog
- Previous by thread: Re: VW --> Bianary file into CLOB or BLOB
- Next by thread: Re: VW --> Bianary file into CLOB or BLOB
- Index(es):
Relevant Pages
|