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 > BLOB Data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-03, 14:54
ansonee ansonee is offline
Registered User
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 253
BLOB Data

I'm working on an application that will be inserting jpegs, bmp's, etc. into a database, and I have a couple of questions.

I've found a couple of samples on the web that use java and c. Was wondering if there was a way to just use a plain SQL INSERT statement to insert a BLOB. We're prototyping this on windows trhen moving to AIX. We're running Version 8, FP3.

Also, is it possible to UPDATE a BLOB column? For example, our application may have to initially create a row in a table without the BLOB. Then the application will later copme back to that row and insert the BLOB. Can you do a UPDATE TABLE_NAME SET BLOB_COLUMN = "jpeg file" where ID = 1.....

Hope this made sense. If not, please post any questions or advice you can offer.

Thanks!
__________________
Anthony Robinson

"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
Reply With Quote
  #2 (permalink)  
Old 12-19-03, 16:00
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: BLOB Data

I don't think an INSERT Statement will help ... May be you can consider IMPORTing if this will help ...

Cheers
Sathyaram




Quote:
Originally posted by ansonee
I'm working on an application that will be inserting jpegs, bmp's, etc. into a database, and I have a couple of questions.

I've found a couple of samples on the web that use java and c. Was wondering if there was a way to just use a plain SQL INSERT statement to insert a BLOB. We're prototyping this on windows trhen moving to AIX. We're running Version 8, FP3.

Also, is it possible to UPDATE a BLOB column? For example, our application may have to initially create a row in a table without the BLOB. Then the application will later copme back to that row and insert the BLOB. Can you do a UPDATE TABLE_NAME SET BLOB_COLUMN = "jpeg file" where ID = 1.....

Hope this made sense. If not, please post any questions or advice you can offer.

Thanks!
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 01-05-04, 12:32
ansonee ansonee is offline
Registered User
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 253
If I'm going to be doing this within an application (stored procedure), would I need to invoke some type of CLP shell? In SQLServer there is something called xp_cmdshell that allows you to invoke line commands. Is there a similar type of functionality within DB2? Or can you just invoke CLP commands within a stored procedure utilizing certain syntax?

Thanks!

...and Happy New Year...!
__________________
Anthony Robinson

"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
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