Solved

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

Posted on 2003-12-03
6
465 Views
Last Modified: 2008-02-01
How i insert image in oracle(using blob or clob) through code and also retreive in vb.
0
Comment
Question by:samarjit_de
6 Comments
 
LVL 4

Accepted Solution

by:
krznpsk earned 38 total points
ID: 9871115
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
 
LVL 53

Assisted Solution

by:Dhaest
Dhaest earned 37 total points
ID: 9872769
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
 
LVL 9

Expert Comment

by:Dang123
ID: 9874190
What version of VB?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now