This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes File data type in oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply 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: 56204
    
  13

"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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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.)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: File data type in oracle
 
Similar Threads
uploading a file using jsp
Problem in retrieving Excel file from Database
Storing array values to a text file
Not able to store ukrainian characters in Oracle 10g database
how to write BLOB type of data from java application into an oracle table