Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 473
  • Last Modified:

How i insert image in oracle (using blob or clob)

How i insert image in oracle(using blob or clob) through code and also retreive in vb.
0
samarjit_de
Asked:
samarjit_de
2 Solutions
 
krznpskCommented:
I have found these articles, straight from MSDN, to be the most helpful.  Basically, it's quite easy, all you have to do is use an array of Bytes, either way, and use a Stream (FileStream or MemoryStream) to convert the byte array to something useful.

Writing BLOB's to DB:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconwritingblobvaluestodatabase.asp

Reading BLOB's from DB:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconobtainingblobvaluesfromdatabase.asp
0
 
DhaestCommented:
first, consider that loading images (and files in general) into a database is probably bad regarding the performance. If at all, you should store them in a separate database...

Besides that, you need to read about the .AppendChunk and .GetChunk to write/read to IMAGE (and TEXT) fields in SQL Server.
Another way to do this is store the file location in the database and simply place image files on the hard drive.  As far as removing the file just remove the record holding the location and then use the kill statement to delete the file off the hard drive.
0
 
Dang123Commented:
What version of VB?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now