jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes how to save files  into oracle database using java as a object. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to save files  into oracle database using java as a object." Watch "how to save files  into oracle database using java as a object." New topic
Author

how to save files into oracle database using java as a object.

Mannu Pal
Greenhorn

Joined: Dec 15, 2008
Posts: 8
Hi ,
i have a requirement in which i have to save some files into a table. and these files may b in any format like (Pdf, csv, doc etc). i have to do this using java coding.

can any one guide me to do this.

Thanks ,

Mannu Pal.
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
you can use blob type to save file of any format as it stores the binary format.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
I am sure "b" is a simple spelling error, but beware: using pseudo-words can make the posts very difficult for some people to read. Please see this FAQ.
Mannu Pal
Greenhorn

Joined: Dec 15, 2008
Posts: 8
Hi raj malhotra ,

i am using blob type. and i am able to save data into oracle database(as object). but at the time of retrieving i am not getting real one.
at the time of insert i am checking the byte[] and at the time or retrieve its giving different byte[].

can you guide how to do this.
if required i will share code with you.

Thanks ,
Mannu Pal.
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Try to save and retrieve this way:

tillu Sharma
Greenhorn

Joined: Dec 07, 2010
Posts: 8
thanks save file in database but how to download save in database file...what is the exact procedure....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to save files into oracle database using java as a object.
 
Similar Threads
Downloading Files with applet
Struts2: file upload not working
A Simple Question
How do i save a file that has been generated using JSP in excel format .
working with pdf.... in java j2ee