| Author |
Inserting Multiple Images into oracle database using JDBC by reading it from text file
|
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
how we can insert multiple images into oracle database....
I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... this is my content of photos.txt file and i have copied all the images into the folder
" C:\\photos "
1,in1.jpg,108,19,in-n-out
2,in2.jpg,187,21,in-n-out
3,in3.jpg,308,41,in-n-out
4,in4.jpg,477,52,in-n-out
5,in5.jpg,530,50,in-n-out
and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
CREATE TABLE PHOTO(
ID NUMBER NOT NULL PRIMARY KEY ,
Name BLOB,
X DOUBLE PRECISION,
Y DOUBLE PRECISION,
Tags VARCHAR2(40)
);
---------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
As i am able to read one image by my above code in1.jpg in to the oracle databse.... Any suggestions how can i insert multiple images into oracle database by looking at my code or any other changes....
Can you give me the example on the basis of the above code of mine...
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
|
Where are the multiple images coming from? In your example, the image is hard coded.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
We have to read the name of image from the text file as given above.... like in1.jpg in2.jpg
and then from that we have to store the image in the oracle database...
and images are stored in photos folder in C drive
"C:\photos"
|
 |
 |
|
|
subject: Inserting Multiple Images into oracle database using JDBC by reading it from text file
|
|
|