Subject | Re: [firebird-support] Blob - Invalid segment size |
---|---|
Author | Vlad Khorsun |
Post date | 2008-06-01T20:16:36Z |
> With larger images to save in blobs, IBPP is throwing exceptionsYes, this is almost correct.
> with this text:
>
> Context: Blob::Write
> Message: Invalid segment size (max 64Kb-1)
>
> Documents I read suggests that the segment size of a blob is
> irrelevant.
> I defined a blob as:Try to Write image_buffer in loop using smaller chunks, say 64K-3.
>
> CON_IMAGE BLOB SUB_TYPE -3
>
> The sub type is my own enumerator, for graphic data.
>
> After this problem started I tried:
>
> CON_IMAGE BLOB SUB_TYPE -3 SEGMENT SIZE 25000
>
> And I also tried a size if 2500.
>
> I'm getting the same error.
>
> The code to write the blob looks like this:
>
> image_blob =
> IBPP::BlobFactory(
> database_record_ptr->get_database_id(),
> selected_transaction_ptr->transaction);
>
> image_blob->Create();
>
> image_blob->Write(image_buffer, image_size);
Regards,
Vlad