wood burning stoves 2.0*
The moose likes JDBC and the fly likes File data type in oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "File data type in oracle" Watch "File data type in oracle" New topic
Author

File data type in oracle

Novita Sihombing
Greenhorn

Joined: May 18, 2006
Posts: 4
I have created a table named EBOOK.
This table will be used to store files from user input in JSP form.
The columns are :ID_EBOOK and FILE.
What is the right data type will be used to store that files?
Hint: I'm using Oracle 9i.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

"Novita Shb",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Originally posted by Novita Shb:
I have created a table named EBOOK.
This table will be used to store files from user input in JSP form.
The columns are :ID_EBOOK and FILE.
What is the right data type will be used to store that files?
Hint: I'm using Oracle 9i.


BLOB is the right data type.

See the LOB datatype example, here:
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html

(Don't think of trying to use the BFILE type, it's far away fro mwhat you want.)
 
 
subject: File data type in oracle
 
Similar Threads
Storing array values to a text file
Not able to store ukrainian characters in Oracle 10g database
uploading a file using jsp
how to write BLOB type of data from java application into an oracle table
Problem in retrieving Excel file from Database