var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: insert image into db2
I want to store an image into table in db2..
Is there any simple way to store image into db2..
such as upload/import directly from directory C into blob table..
the table look like this
CREATE TABLE photo(picture BLOB(50K))
any help would be grateful
Save the image in a file, e.g. c:\temp\photos\myface.jpg
Create a text file, e.g. c:\temp\import.txt with the contents:
Issue an IMPORT command:
db2 import from c:\temp\import.txt lobs from c:\temp\photos method p(1) insert into photo (picture)
I'm curious how you will be looking up pictures from a table that does not have a key...
thanks for the reply..
actually the table is just for example..
so if i create table like this
CREATE TABLE photo(id int, picture BLOB(50K)) ..
the c:\temp\import.txt with the contents will be:
am i right?
i just curious if i can or not import xml and lob at same time into table below..
CREATE TABLE photo(id int, picture_info XML, picture BLOB(50K))...