Subject | Blob - Invalid segment size |
---|---|
Author | inoffensive_2006 |
Post date | 2008-05-31T10:25:29Z |
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
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