Subject Re: Blob - Invalid segment size
Author inoffensive_2006
--- In firebird-support@yahoogroups.com, "Leyne, Sean" <Sean@...> wrote:
>
>
>
> > > 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
> >
> > Thanks Paul:
> >
> > I replaced the blob declaration in my CREATE TABLE with
> > one setting the sub type to 0 and the size to 32762.
>
> The "Segment Size" value is no longer of any real significance for
> modern applications, it is for support of real legacy applications (ie.
> ancient).
>
> A value of 80 is fine for all purposes.

Thanks Sean:

So, why does this:

CON_IMAGE BLOB SUB_TYPE 0 SEGMENT SIZE 80

Result in this?

Context: Blob::Write
Message: Invalid segment size (max 64Kb-1)

If segment size isn't an issue, why does Firebird even
have this error message?

I've crawled over my C++ and the SQL it produces, this
is dynamic SQL, and I don't see what I'm doing wrong.

The fact that this works with small images tells me
the code is basically correct.

I appreciate your effort to help me.

Thanks
Larry