a newbie's queation about BYTE datatype
Posted in 1999
Topics: General Discussion
Hello:
can someone direct me how to insert a picture file or something alike
into Informix Dynamic Server's database using SQL statements.Is the
following SQL statement is correct?
INSERT INTO picture_database(PICTURE_FILE)
VALUES('c:\\mypicture.jpg')
njtv wrote:
> can someone direct me how to insert a picture file or something alike
> into Informix Dynamic Server's database using SQL statements.Is the
> following SQL statement is correct?
> INSERT INTO picture_database(PICTURE_FILE)
> VALUES('c:\\mypicture.jpg')
The statement looks plausible but is, as you know, incorrect.
The short answer is that there is no way to write blob-literals other than
NULL,
and there's no way to load them from a file other than by using a ESQL/C
program.
The SQLCMD program in the IIUG archives has a separate executable, UPDBLOB,
which updates a blob from a file. It could be adapted, no doubt, to do
loading too, or instead.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN
#include <disclaimer.h>