Re: BLOB objects
Posted in 1996
In 4gl:
DEFINE p_blob_column BYTE -- (the same for TEXT)
...
# The next statement brings the existing blob in memory
LOCATE p_blob_column IN "/mydir/mybinaryfile.xxx"
INSERT INTO blob_table VALUES (..., p_blob_column, ...)
or
UPDATE blob_table SET blob_column = p_blob_column WHERE condition
LOCATE p_blob_column IN MEMORY -- or FREE ...
Hope this helps
Mario R. Canto
mcanto@unl.edu.ar
On Thu, 4 Jul 1996, Chao Y. Din wrote:
} Chien-Chang Lin wrote:
} >
} > Hi, all:
} >
} > I am sorry for asking such question, because I am a new user of
} > Informix. The Informix database can store BLOB objects, but how the
} > BLOBs are PUT into the database? How can I create a new table for BLOB
} > storage (use isql?) and add some BLOBs in it? The BLOBs are some
} > pictures such as gif, jpg, or tif.....thanks...:)
} >
} > cclin
}
} The easiest way is probably "load" statement, but I heard it does not work.
} I am not ssue whether it is solvable through "load".
}
} Anyway, we are using C code to load images into the database. In fact, BLOB
} is not limited to any kind of images. It can even be audio info. You can
} imagine how important BLOB is when dealing with multimedia applications.
} Check out the ESQL/C manual comes with Informix.
}
} When creating tables define the data type to "byte" for BLOB, "text" for TEXT.
}
} If you cannot fine the c code, send me an e-mail. I can send you a sample
} code.