Subject Re: The nearest match for Memo type ?
Author rrokytskyy
--- In Firebird-Java@y..., Marczisovszky Daniel <marczi@d...> wrote:
> SA> What would be the nearest match for Memo type in Access?
SQL2GDB converted it as
> SA> BLOB. But Java handles BLOBs completeley differently than Memo
types (these are just
> SA> long strings with a max. cap of 32K). Anyone with ideas?
>
> VARCHAR in FB can be 32K long :)
>
> By the way, you may access BLOBs with getString and setString, so it
> makes no difference compared to CHAR/VARCHAR fields.

Note, that VARCHAR is 32k bytes long, and actual capacity depends on
the character set you specified for column or database. In case of
UNICODE_FSS the lowest size is ~11K (max 3 byte per char, 32K / 3).

So, if you need to store 32k unicode characters you have to use BLOB
SUB_TYPE 1 (setting subtype to 1 will tell database that you have
text data there, driver will treat them as LONGVARCHAR). But you have
no =, >, <, LIKE, etc. operations defined on BLOB.

I you do not use unicode, then Daniel's suggestion is better.

Best regards,
Roman