Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updatin blob column in a table with file on my disk

 
navi kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Could someone help me!

I have a file called "FILE.txt" on my disk at c:/dir/FILE.txt

Now I want to upload this file into the following table.

Table NAME : ATTACHMENTS_TABLE

FILE_NAME varchar2(30)
FILE_CONTENT BLOB
ATTACHED_DT DATE

Can some one suggest how to get that file on my disk into the input Stream?

THanks for you help
 
Dan Howard
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could read the whole file into a string and then simply assign the string:

 
navi kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dan, thanks for you reply

Can I give something like this:

String filePath = C:/dir/file.txt;

Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic