[Lazarus] Reading\Writing Blobs (Maybe off-topic)

Birger Jansen birger at cnoc.nl
Thu Aug 19 09:11:05 CEST 2010


I have experience with firebird, blob fields, and a little bit zeos, but not with the combination of all three together. We always use blobs with (memory)streams and parameters. A query then looks like 

MyQuery.SQL.Text := 'UPDATE BlobTable SET BlobField = :BlobField WHERE MyID = :MyID'

And the query-parameter is set:

MyQuery.Params.ParamByName('BlobField').LoadFromStream(MemSt, ftBlob);

Maybe you have the same options in Zeos?

Kind regards,
  Birger

> -----Oorspronkelijk bericht-----
> Van: Andreas Berger [mailto:Andreas at TheBergerClan.org]
> Verzonden: donderdag 19 augustus 2010 0:44
> Aan: Lazarus mailing list
> Onderwerp: [Lazarus] Reading\Writing Blobs (Maybe off-topic)
> 
>   Sorry for this possible off-topic mail. I should ask at Zeos, but since
> I do not subscribe to their list I thought to try here.
> 
> I need to read and write a blob (record) to a firebird database. I am
> using Zeos but no db-aware components. In other words I use only datasets
> and queries with SQL.Text and open or ExecSQL. I know that some people
> convert the data replacing zeros with some escape sequence. But I would
> like to avoid this since most of the time most of the data is zero.
> 
> The question how do you read a blob using SQL.Text and Open, and write
> using SQL.Text and ExecSQL?
> 
> Grateful for any good solution,
> Andreas
> 
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list