Subject Re: About Blob data type
Author Roman Rokytskyy <rrokytskyy@yahoo.co.uk>
> Hello I'm trying to save jpg files into the database. How I can do
that?
> The code is :
> CREATE TABLE PICTURES(
> ID_PHOTO IDPHOTO,
> NAME_PHOTO,
> FOTO BLOB SUB_TYPE(0-15) SEGMENT SIZE 80)
>
> My question is Witch kind of sub_type I have to say for storage
> jpg files into de database

Any SUB_TYPE > 0 is reserved for the system use and should not be
used for custom data types. You are free to use any negative SUB_TYPE
(like SUB_TYPE -1) to indicate that that particular BLOB contains
JPEG data. Having subtypes for JPEG and for BMP one can create blob
filters to automatically perform translation between these types.
However, if you do not plan to use blob filters and do not need to
identify type of binary data by blob subtype (usually you know what
kind of content is stored in your column), you can use SUB_TYPE 0
(default one) to store generic binary data. Your table definition
will look like this:

CREATE TABLE PICTURES(
ID_PHOTO IDPHOTO,
NAME_PHOTO NAMEPHOTO,
FOTO BLOB SEGMENT SIZE 80)

I assume that you missed NAMEPHOTO domain in your previous post.

Hope this helps.

Best regards,
Roman Rokytskyy