Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-29 Thread Pavel Ivanov
> Its a shame that a BLOB handle is not returned as a result of a query > rather than the BLOB itself. Let me correct you. It's not a shame, it's database specifics and it has its good points. For me personally I'd hate if SQLite returned me some abstract handle if I requested blob value. Note: i

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Mark Hessling
Well that is very disappointing :-( Not being able to extract a portion of a BLOB from a result set without having the complete BLOB in memory makes it impractical to use BLOBs in SQLite in a database independent manner. Its a shame that a BLOB handle is not returned as a result of a query rathe

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Simon Slavin
On 29 Dec 2009, at 2:18am, Igor Tandetnik wrote: > Simon Slavin wrote: >> On 29 Dec 2009, at 2:02am, Zaher Dirkey wrote: >>> If i want to extract BLOB to a file that mean it is must the whale >>> blob be loaded to memory before can save it? >> >> Yes. Also, the whole BLOB must have been in memo

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Igor Tandetnik
Simon Slavin wrote: > On 29 Dec 2009, at 2:02am, Zaher Dirkey wrote: >> If i want to extract BLOB to a file that mean it is must the whale >> blob be loaded to memory before can save it? > > Yes. Also, the whole BLOB must have been in memory in the first place, when > you saved the record. Not

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Igor Tandetnik
Zaher Dirkey wrote: > If i want to extract BLOB to a file that mean it is must the whale > blob be loaded to memory before can save it? No, not with BLOB I/O. But you have to be careful: don't mention the BLOB field in your SELECT statement, retrieve the ROWID instead. Then use it in sqlite3_blo

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Simon Slavin
On 29 Dec 2009, at 2:02am, Zaher Dirkey wrote: > Pavel Ivanov wrote: >> > >> Just keep in mind that if the user puts blob column into a query >> (which IIRC is required by SQLGetData) then SQLite reads full blob >> value into memory before you can do anything with that. So you're not >> with a

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Zaher Dirkey
Pavel Ivanov wrote: > > Just keep in mind that if the user puts blob column into a query > (which IIRC is required by SQLGetData) then SQLite reads full blob > value into memory before you can do anything with that. So you're not > with a good luck here anyway. > If i want to extract BLOB to a fil

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-28 Thread Pavel Ivanov
> The implementation for the SQLite ODBC driver does not use incremental > BLOB I/O, it reads a BLOB into memory for each row > fetched. Not much use if the size of each image in the SQLite database > is 3gb and you only have 2gb memory. I'm looking for a solution that > will work on BLOBs larger t

Re: [sqlite] Using incremental BLOB I/O when processing result set

2009-12-27 Thread Igor Tandetnik
Mark Hessling wrote: > Before I try and implement SQLGetData using the incremental BLOB I/O I > need to know if the approach I am taking is possible. > The major issue is with the API function sqlite3_blob_open(). It > requires: > const char *zDb - according to documentation this could be set to >