| |
|
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.
|
 |

12-14-06, 02:14
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 24
|
|
|
How to store the images in db2 as BLOB ?????
|
|
Hi,
May I know how to store and retrieve the images in the database as BLOB data type unless using extender?
Can we store like that unless using extender?
Thanks,
|
|

12-14-06, 02:17
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
|
blob
there have been some recent discussion regarding this subject
do a search and have a look
this is one of the entries:
Db2 Blob
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
Last edited by guyprzytula; 12-14-06 at 02:23.
|

12-14-06, 03:34
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 24
|
|
|
|
Hi guyprzytula,
I have been read the article BLOB for Java.But what I would like to know is that whether we can insert and select the BLOB data types or not and if can,how to do that?
I am not using Java or Unix.
I am working on the window environment.
Thanks,
Quote:
|
Originally Posted by guyprzytula
there have been some recent discussion regarding this subject
do a search and have a look
this is one of the entries:
Db2 Blob
|
|
|

12-14-06, 12:33
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
|
blob
as indicated before, the only way without a program is using import and keeping the blobs in a file
with import replace the column contents with the location/name of the blob file
do import with : modified by lobsinfile
retrieve is not possible : blob is not displayable
select with extenders or application
see develop.works for some articles on how to handle blob data from within an appl
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
|

12-20-06, 23:25
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 24
|
|
Hi guyprzytula,
Thanks for your response.
I have another 2 questions.
1.May I know how to write the sql script?I am not very clear the following setense.What I am confusing is if I store the path,it's like storing a link.But I don't think you mean like it.Could u pls give me more explanation or give the script sample?
2.Can I retrieve it(BLOB pict) using other applications like Microsoft.Net???
Thanks in advance,
Quote:
using import and keeping the blobs in a file
with import replace the column contents with the location/name of the blob file
do import with : modified by lobsinfile
|
Quote:
|
Originally Posted by guyprzytula
as indicated before, the only way without a program is
Quote:
using import and keeping the blobs in a file
with import replace the column contents with the location/name of the blob file
do import with : modified by lobsinfile
|
retrieve is not possible : blob is not displayable
select with extenders or application
see develop.works for some articles on how to handle blob data from within an appl
|
|
|

12-23-06, 07:39
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
|
blob
table : col1 char(1), col2 integer, col3 blob
create an file keeping the input data
sample input.data
a,1,c:\data\picture1.jpg
b,2,c:\data\picture2.jpg
now execute import
import from input.data of del modified by lobsinfile insert into tablename
q2: have a look at develop.work - there should be some samples-docs...
or have a look in appl develop guide of db2
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
|

12-28-06, 02:02
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 24
|
|
Dear guyprzytula,
If I store like c:\data\picture1.jpg,how the database store(as path or as image? I mean the database will store the path as "c:\data\picture1.jpg" or will store the actual image?
After I store the image as "c:\data\picture1.jpg",can I delete the physical picture(picture1.jpg)? I mean ,if there is no such path(c:\data\picture1.jpg) in the PC,can I retrieve the image?
Thanks in advance,
Quote:
|
Originally Posted by guyprzytula
table : col1 char(1), col2 integer, col3 blob
create an file keeping the input data
sample input.data
a,1,c:\data\picture1.jpg
b,2,c:\data\picture2.jpg
now execute import
import from input.data of del modified by lobsinfile insert into tablename
q2: have a look at develop.work - there should be some samples-docs...
or have a look in appl develop guide of db2
|
|
|

12-28-06, 06:39
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 471
|
|
|
lob
yes the entire file will be stored. If needed, the physical file can be removed.
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
|
|

01-09-07, 04:31
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 24
|
|
Thank you so much,guyprzytula.
Btw,if I store the image in the database,the database size would be about 2 times bigger than before.Am I right?
May I know what is the advantages and disadvatages of storing the CLOB,BLOB data in the database?
Thank in advance,
Quote:
|
Originally Posted by guyprzytula
yes the entire file will be stored. If needed, the physical file can be removed.
|
|
Last edited by Coolhard; 01-15-07 at 01:07.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|