Re: VW --> Bianary file into CLOB or BLOB



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 it
in and of from a database through CLOB or BLOB.

myByteArray:='myFirstSong.mp3' asFilename
doSomeUnknownActionOnFullContents.
you could have a look at how Store stores LOBs, starting at
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





.



Relevant Pages

  • Good DBA Book
    ... I'm sure this question has been asked a hundred times, but after looking into google for a few hours, I have so many books, I really don't know which one is right. ... like Oracle Essentials from O'Reilly. ... With all the step required, and if possible, example code and script, what is involved in a production database. ... The course will explain how to use PostgreSQL, ...
    (comp.databases.oracle.server)
  • Re: DBI and DBD issues with Accessing BLOB
    ... DBD-Oracle Oracle database driver for the DBI module ... The data that is in the blob is zipped/compressed XML data. ... > server is at least an 8.1.7 database, but you've not posted your versions ...
    (perl.dbi.users)
  • Read from database, write to another database, simultaneously
    ... I am working on a simple script to read from one database (oracle) and ... chunks and drop the data to postgresql continuously. ... of the python database clients mentioned that using one thread to ... retrieve the data from the oracle database and another to insert the ...
    (comp.lang.python)
  • Re: Oracle 10g RAC performance
    ... a lot of companies selling junk to clean up their schemas and their ... to switch to another database. ... PostgreSQL as I believe that it will present a serious challenge to ... Oracle very soon. ...
    (comp.databases.oracle.server)
  • Re: VW7.3 Long RAW --> BLOB in Oracle9i
    ... >> I am using the lens to get through to Oracle but BLOB or CBLOB is not ... > the types are only used as switches for Oracle behaviour. ... > database facilities for any data processing. ... > Oracle long raw class and have had no problems. ...
    (comp.lang.smalltalk)