Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countAbc challenge 9 59
pairs challenge 5 66
Device same like our heart 12 79
Apps blocked by Java 9 64
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
A short article about a problem I had getting the GPS LocationListener working.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

863 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

18 Experts available now in Live!

Get 1:1 Help Now