On 4/19/07, Stan Bielski <[EMAIL PROTECTED]> wrote:
On a similar note, are there any hacks available to write a blob to a file
using a limited memory buffer? As far as I can tell, the sqlite API requires
that a blob be read in its entirety, which is rather unfortunate when the
blob is bigger than memory...

The usual way is to store your BLOB in chunks yourself, so you can
obtain parts of it in random order (and not exausting your memory).

For example:

CREATE TABLE blobs ( blob_id, blob_seq, blob_data );

Now you can retrieve your blob data by:

SELECT blob_data FROM blobs WHERE blob_id=:ID: ORDER BY blob_seq;

Disclaimer: I haven't tested the SQL, but you should get the idea.

Regards,
~Nuno Lucas


Thanks,
-Stan


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to