A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
Image insertion
akilan kandaswamy
Greenhorn
Joined: Feb 26, 2001
Posts: 4
posted
Mar 07, 2001 06:59:00
0
hai all,
pls some1 tell me how to insert a image into a database and retreving it from the database, Code will be helpful.
thanx
hanumanth reddy
Ranch Hand
Joined: Jun 12, 2000
Posts: 118
posted
Mar 07, 2001 07:32:00
0
Read the Image Using Input stream and store that Store in the data base and retrive back and make it a file
<a href="http://www.jobklub.com" target="_blank" rel="nofollow">http://www.jobklub.com</a><br /> 'Add Job To Life'
David Freels
Ranch Hand
Joined: Feb 01, 2001
Posts: 102
posted
Mar 09, 2001 13:45:00
0
You will need to use a
PreparedStatement
and set the image to a stream. The database will store the image in a BLOB.
Here is a chapter from the tutorial with code examples:
http://java.sun.com/j2se/1.3/docs/guide/jdbc/blob.html
Hope this helps.
David
I agree. Here's the link:
http://aspose.com/file-tools
subject: Image insertion
Similar Threads
inserting image
Struts
wants to configure next and previous buttons for database entry !
thumbnail in jsp
how to store an image into the DataBase using oracle database
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter