Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Espanol
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Espanol section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 14th, 2005, 10:21 AM
Registered User
 
Join Date: Feb 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default reading image from database

Hi
How we can retrieve images from database?

 
Old March 13th, 2007, 06:12 AM
Registered User
 
Join Date: Mar 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

save the image as collection of byte in database and retrieve them as byte[] and just build the picture.
if need any further assistance please notify me.
thanks...

1111
 
Old January 5th, 2008, 04:04 AM
jomet
Guest
 
Posts: n/a
Default

Hi,
Storing images in databases take time delay.
simply upload the pages to a folder
and save the path in db
then simply retrieve the path and use
<img src="<%=filepath%>">

regds

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old January 7th, 2009, 11:26 AM
Registered User
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You can store image as BLOB in the DB , but it not recommended bcoz , it takes lot of of time and increaded database files inturn it will be difficult to maintain the database in terms of archiving,etc.

So better option is to store in file system and store that reference in database. Then user java io and servlet stream API together to render the response.

you can see example at the following url

http://www.exampledepot.com/egs/java.../GetImage.html


Suman.
The Following User Says Thank You to suman124 For This Useful Post:
sabra (March 8th, 2009)
 
Old March 8th, 2009, 09:35 AM
Authorized User
 
Join Date: Jul 2006
Posts: 73
Thanks: 11
Thanked 1 Time in 1 Post
Default

Hi suman124, now you take to me how to finished me problem.
tenks





Similar Threads
Thread Thread Starter Forum Replies Last Post
set image on <asp:Image> stored in DataBase myself.panku ASP.NET 2.0 Professional 1 August 11th, 2008 10:41 AM
Reading images from Database shankhan Classic ASP Databases 1 March 21st, 2005 01:36 AM
Reading from database larry101 Classic ASP Databases 5 September 23rd, 2004 03:43 PM
How can I reading InterBase database not24 C# 2 September 21st, 2004 12:51 AM
Reading data from database... Thomas82 Classic ASP Databases 3 February 25th, 2004 03:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.