Subject Re: [IBO] Blob Metadata and Scripts
Author Geoff Worboys
> I used the "Extract Metadata DDL" button in IB_SQL and then tried to
> run the script using it's "Execute Script" button. I was getting
> errors.

It may help if you said what the "errors" were. I am guessing the
errors were related to the use of character set with a non-text blob
although AFAIK these are permitted (albeit probably useless).


> Come to find out that Blob fields (which are just memo fields I
> created in the tables) are not getting extracted right by the
> metadata button. When I changed the Blob field definitions from what
> the metadata used:
> BLOB SUB_TYPE 0 SEGMENT SIZE 80 CHARACTER SET NONE
> to what the table source says:
> BLOB( 65535, 0 )
> then it works. Is this a bug in IBO 4.2 Hf?

What version of server?

In actual fact both declarations are incorrect for text blob fields
(you did say they were just "memo" fields). Since the blob sub_type
should be 1 for text blobs.

either
BLOB SUB_TYPE 1 SEGMENT SIZE nn CHARACTER SET NONE
or
BLOB( nn, 1 )

I am guessing that the segment size issue (80 vs 65535) may be
coming from the fact that the API is inconsistent with its support
for unsigned short. In some areas the API will support effectively
unsigned values, in other areas they cause problems. The general
rule of thumb that I use is dont exceed 32k on 16bit values when
dealing with the API.

It is possible that I can find another way of dealing with the
segment length that will support an unsigned 16bit value. But
before I look at that I would like to know what errors the original
code is causing (and on what server).

--
Geoff Worboys
Telesis Computing