Informix : Inserting into blob column using 'insert statement' in dbaccess -- Posted by inturi on Wednesday, January 23 2008
create table t (
id serial,
image clob
) put image in (image_sbs);

When using dbaccess:
INSERT INTO t VALUES (0, filetoblob('filename','server');

if absolute path is not specified then filename should be in the
current working directory. 'server' hints that the file exists on
server computer. Other option is 'client'. In this case file resides
in client computer.


Similar fns. filetoblob(), filetoclob(), lotofile(), locopy().

INSERT INTO inmate
VALUES (437, FILETOBLOB('datafile', 'client'),
FILETOCLOB('tmp/text', 'server'))

The following SELECT statement uses the LOTOFILE() function to copy data from the felony column into the
felon_322.txt file that is located on the client computer:

SELECT id_num, LOTOFILE(felony, 'felon_322.txt', 'client')
FROM inmate
WHERE id = 322

[Edit] Home
If this information is helpful to you then please click here and post one simple tip that you know. Share your knowledge!