If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to save jpg, bmp files to DB2?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-06, 04:02
WooFat WooFat is offline
Registered User
 
Join Date: Nov 2006
Posts: 5
How to save jpg, bmp files to DB2?

How can I do so? Thanks a lot
Reply With Quote
  #2 (permalink)  
Old 11-16-06, 04:30
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
what is your database type and version and what is your operating system name and version?
Grofaty
Reply With Quote
  #3 (permalink)  
Old 11-16-06, 04:40
WooFat WooFat is offline
Registered User
 
Join Date: Nov 2006
Posts: 5
Thank you for your reply.

DB is DB2 version 7
OS is Window XP
Reply With Quote
  #4 (permalink)  
Old 11-16-06, 11:51
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
bmp

create a table with column type blob (eg col1 char(1), col2 blob xxM
create input data file eg test.data with record :
xxx,c:\tmp\filename <<--- the filename of object bmp...
import from test.data of del modified by lobsinfile insert into tablename
this will import the col1 with data and col2 with files
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #5 (permalink)  
Old 11-16-06, 20:34
WooFat WooFat is offline
Registered User
 
Join Date: Nov 2006
Posts: 5
Thank you very much.
Let me try it.
Reply With Quote
  #6 (permalink)  
Old 11-17-06, 00:14
manish21 manish21 is offline
Registered User
 
Join Date: Jan 2003
Posts: 35
I know this question may sound stupid.
We can save the documents or jpg files as blob . But can we retrieve and see this jpgs through some db client and actually see them as jpgs and not as some encrypted data?
Reply With Quote
  #7 (permalink)  
Old 11-17-06, 01:06
Coolhard Coolhard is offline
Registered User
 
Join Date: Aug 2005
Posts: 24
Hi,

May I know whether we can store the BLob(e.g bmp files) data type to DB2 UDB 7.1 (not an Enterprise Edition) without installing any other tools???


Thanks,
cool



Quote:
Originally Posted by guyprzytula
create a table with column type blob (eg col1 char(1), col2 blob xxM
create input data file eg test.data with record :
xxx,c:\tmp\filename <<--- the filename of object bmp...
import from test.data of del modified by lobsinfile insert into tablename
this will import the col1 with data and col2 with files
Reply With Quote
  #8 (permalink)  
Old 11-17-06, 01:10
Coolhard Coolhard is offline
Registered User
 
Join Date: Aug 2005
Posts: 24
Cool

Yes.I am also interested in this question.
How to retrieve those jpg files from DB2 to see as normal Jpg files???

Thanks,


Quote:
Originally Posted by manish21
I know this question may sound stupid.
We can save the documents or jpg files as blob . But can we retrieve and see this jpgs through some db client and actually see them as jpgs and not as some encrypted data?
Reply With Quote
  #9 (permalink)  
Old 11-17-06, 01:41
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
bmp

yes in V7 this was also available
to view actually these pictures or any other object usually :
- or use a tool that can match a column with a specific program to open this blob : like qmf is doing. whenever this column is clicked, a program will be launched to handle this object.
- there are also extenders in db2 available that handle this in similar way
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #10 (permalink)  
Old 11-20-06, 23:19
WooFat WooFat is offline
Registered User
 
Join Date: Nov 2006
Posts: 5
Thank you very much for your reply.
But I still wonder to know which extenders in DB2 can do so.
Thanks a lot
Reply With Quote
  #11 (permalink)  
Old 11-21-06, 01:53
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
extenders

__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #12 (permalink)  
Old 11-21-06, 01:59
WooFat WooFat is offline
Registered User
 
Join Date: Nov 2006
Posts: 5
It sounds great!!!
But my version is 7, can I still use it?
Thanks.
Reply With Quote
  #13 (permalink)  
Old 11-21-06, 07:44
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
ext

yes, these extenders existed already before V7
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #14 (permalink)  
Old 11-23-06, 02:01
Coolhard Coolhard is offline
Registered User
 
Join Date: Aug 2005
Posts: 24
Quote:
Originally Posted by guyprzytula
yes in V7 this was also available
to view actually these pictures or any other object usually :
- or use a tool that can match a column with a specific program to open this blob : like qmf is doing. whenever this column is clicked, a program will be launched to handle this object.
- there are also extenders in db2 available that handle this in similar way
Hi Guy Przytula,

May I know qmf is a tool or command?
Is there any other way to store the bmp/jpg files without using extender or tool???
I mean : is there any command for it???

Thanks,
Reply With Quote
  #15 (permalink)  
Old 11-23-06, 06:45
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
bmp

QMF (query management facility) for windows/mainframe is a software from IBM
it allows users to create/share query-reports-procedures

yes : import can do for insert/update of new/replace files
it can also be done with applications like java : see
http://www-128.ibm.com/developerwork...310bhogal.html
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On