Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File data type in oracle

 
Novita Sihombing
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
stu derby
Ranch Hand
Posts: 333
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic