Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 19th, 2006, 06:45 AM
surya_jc surya_jc is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 1 surya_jc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m
Reputation Power: 0
Post How to save the pdf files, images into the MySQL database

This is the basic code i want to use ........
I also create one database name " objdatabase " with 2 fields (slno(int),contents(blob))...... o.k.......


import java.net.*;
import java.io.*;
import java.sql.*;
import java.sql.Blob;

public class URLConndb1 {
public static void main(String[] args) throws Exception {
// URL yahoo = new URL("http://172.16.10.125:8080/nbeii/pdf/Priyan%20abstract.pdf");
URL yahoo = new URL("http://172.16.15.100/amc");
Object o = null;



URLConnection yc = yahoo.openConnection();
o = yc.getContent();

System.out.println("Perfect upto this.....");
o = yc.getContent();
if(o!= null)
{
System.out.println("object present");
System.out.println("Content type : "+yc.getContentType());
}
else
System.out.println("not present");
}
}


Now i want to store the object i am collecting from the url to database. Right now i created the database with the datatype as blob

Any help will be appreciated.....
Will also be thankful......

Reply With Quote
  #2  
Old May 8th, 2009, 03:14 AM
ramkumarm ramkumarm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2009
Posts: 1 ramkumarm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 18 sec
Reputation Power: 0
Please Help me Retrive the Image from MySQL Database

I have upload the Image into MySQL Database Table using BLOB Datatype. It's working successfully. I have upload the image into Database as a Binary Data.

But the problem is to retrive and display the image from Databse.

I need to retrive the image, which is store in the Database table, and display it on jsp page. I have upload the image using jsp page also.


Reply me ..

Thank u in advance ....

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > How to save the pdf files, images into the MySQL database


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap