Solved

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

Posted on 2003-12-03
6
467 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

786 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