Subject RE: [firebird-support] Blob - Invalid segment size
Author Mercea Paul
Hi



I have tried with

CREATE TABLE CAS_TEST (

ID_TEST ID /* ID = BIGINT */,

IMAGE BLOB SUB_TYPE 0 SEGMENT SIZE 32762

}



And works ok inserting 10 mb picture if you need!



Regards,

Paul



From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of inoffensive_2006
Sent: 31 May 2008 13:25
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Blob - Invalid segment size



Hi Folks:

Developing code on Win XP Home, Visual Studio 2008 Pro, C++.
Using Firebird 2.0.1.1285, and IBPP.

I have image data that I've been saving to the database with no
problem. These images are about 40 KB.

My partner's wife has a new 10 Mega Pixel camera. The one image we
are using from that camera is 684 KB.

With larger images to save in blobs, IBPP is throwing exceptions
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:

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);

image_blob->Close();

st->Set(1, image_blob);

The exception is thrown on the Write statement.

Suggestions?

Thanks
Larry





[Non-text portions of this message have been removed]