Subject | RE: [IBO] IBObjects Appending to a blob |
---|---|
Author | Jason Wharton |
Post date | 2007-02-16T19:07:21Z |
> Hi, I'm creating a large number of blob records (2 million plus) inBased on my understanding if the blob is modified it will be entirely
> Firebird used for word searching. When new words are added I need to
> append the ids of the new words to the end of existing blobs. I would
> like to use the bsmReadWrite flag in IBObjects' CreateBlobStream to
> seek to the end of an existing blob and WriteBuffer the new id number
> on the end but I'm not sure of the correct syntax.
>
> At present I open the blob stream in bsmRead mode, copy it to a stream
> opended in bsmWrite mode, append to the end using WriteBuffer and then
> write the appended stream back. This can be very slow when updating
> hundereds of words at a time.
>
> Does anyone have any info on how to use the bsmReadWrite stream or a
> better way of appending to a blob stream?
>
> I'm using Delphi v6, IBObjects v4 and Firebird v2.0.
replaced on the server from the client. I am not aware of any mechanism in
the API to append to a blob.
In my opinion you are abusing blobs with this type of a design. If you are
storing fixed format data at the end of a blob, why not just store it in an
additional column added to the table? That way it is handled separately and
can be indexed if necessary.
Jason Wharton