sqlite3 reading blob with delphi

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
gev
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 07.12.2005, 10:46

sqlite3 reading blob with delphi

Post by gev »

Hi
i hav ea problem, if i wont to read the blob field i get only the first byte and the size of stream is olso 1 insted of 40.
Hier is the code
var blob : TStream;
Begin
blob := zeostable.CreateBlobStream(zeostable.FieldByName('data'), bmRead);
showmessage(inttostr(blob.Size));
end;

becouse of this i decided to dump the field and read from a file, so reading from the file is working but i can't dump to file becouse the same problem, i get only the first byte of the field.

hier is the second code
var filestr : TFileStream;
begin
filestr := TFileStream.Create('C:\hehe',fmCreate);
blob := zeostable.CreateBlobStream(zeostable.FieldByName('data'), bmRead);
showmessage(inttostr(blob.Size));
filestr.CopyFrom(blob,blob.Size);
end;

hier is the size again 1;
can some1 help me plz.
thanks
gev
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 07.12.2005, 10:46

Post by gev »

Its a bug in ZeosDB, i switch to ather components and with the same code its working perfect.
Post Reply