Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-02

Posting image into Sqlite with CreateBlobStream not working

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul van Helden

Hi,

When I put image data into a BLOB field with
TSqlite3Dataset.CreateBlobStream and query BlobStream.Size the returned size is much smaller than the data copied into the stream.

So far I have traced it to line 366 in
fpc\2.2.3\source\packages\fcl-db\src\sqlite\customsqliteds.pas:

FRowSize:=StrLen(NewRow);

NewRow, having just received some image data, contains #0's, so StrLen returns undesired result. Line 326 must also be wrong.

How to fix?

While I have your attention: on http://sqlite-wince.sourceforge.net/ there is a newsflash saying "v3.3.5 is now official - new version is just a copy of Sqlite source". Does this mean the official Sqlite source works on Wince, and can anybody point me to a recent binary or compile instructions for Sqlite on Wince?

Thanks,

Paul.

Reply by email

Luiz Americo Pereira Camara
to Paul van Helden
Paul van Helden wrote 16 lines
Hi, When I put image data into a BLOB field with TSqlite3Dataset.CreateBlobStream and query BlobStream.Size the returned size is much smaller than the data copied into the stream. So far I have traced it to line 366 in fpc\2.2.3\source\packages\fcl-db\src\sqlite\customsqliteds.pas: FRowSize:=StrLen(NewRow); NewRow, having just received some image data, contains #0's, so StrLen returns undesired result. Line 326 must also be wrong. How to fix?

Binary blob fields are not supported by sqlite3dataset currently. You can try http://source.online.free.fr/ or sqldb.

Luiz

Reply by email